It is annoying that you can't do that in PL/SQL. You could use an exception but I think this looks cleaner:
Code:DECLARE CNTR INTEGER; .... BEGIN .... SELECT COUNT(*) INTO CNTR from my_table where my_field='my_value' AND ROWNUM = 1; IF CNTR <> 0 THEN etc ....




Reply With Quote