Skip to Main Content

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 due to inactivity on Aug 16 2015
Added on Jul 12 2015
25 comments
121,422 views