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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

efficient way to check if record exists

944524Jul 12 2015 — edited Jul 19 2015

Hi,

I need to check if atleast one record present in table before processing rest of the statements in my PL/SQL procedure. Is there an efficient way to achieve that considering that the table is having huge number of records like 10k

I am using like below

select count(*) into flag

from T1 where ID = input_id;

if flag > 0

then perform operations

else

do nothing

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 16 2015
Added on Jul 12 2015
25 comments
126,960 views