SyntaxFix
Write A Post
Hire A Developer
Questions
select max( 1 ) into my_if_has_data from MY_TABLE X where X.my_field = my_condition and rownum = 1;
Not iterating through all records.
If MY_TABLE has no data, then my_if_has_data sets to null.