Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

To check record exists in table along with condition

944524Sep 16 2015 — edited Sep 17 2015

Hi,

How can i check if the records exist in Table T1 , i am using something like this

select count(*) into lv_cnt

from T1 where status = 'F';

if lv_cnt >0

then

Hi

..

..

else

How are you

..

..

end if;

I need to also check if records exist in T1 for eg if there are no records present in T1 irrespective of Status = 'F' it should go to 'Hi' Condition,basically if there is one record present with status F and if there is no records at all in T1 then goto to 'Hi' condition

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 15 2015
Added on Sep 16 2015
11 comments
1,970 views