Thanks for the question, abhishek .
Asked: July 06, 2016 - 4:38 am UTC
Answered by: Chris Saxon - Last updated: July 06, 2016 - 7:53 am UTC
Category: Database - Version: 11g release 2
Viewed 100+ times
if 1=1 then
select /*+ executed */1 into l from dual;
select /*+ not_executed */2 into l from dual;
select sql_text from v$sql
where sql_text like '%executed%'
and sql_text not like '%not this%';
declare l int; begin if 1=1 then select /*+ executed */1 into l from dual; else select /*+ not_executed */2 into l from dual; end if; end;
SELECT /*+ executed */1 FROM DUAL
Connor and Chris don't just spend all day on AskTOM. You can also catch regular content via Connor's blog and Chris's blog. Or if video is more your thing, check out Connor's latest video and Chris's latest video from their Youtube channels. And of course, keep up to date with AskTOM via the official twitter account.
Share and learn SQL and PL/SQL; free access to the latest version of Oracle Database!
Classes, workouts and quizzes on Oracle Database technologies. Expertise through exercise!