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!

check for row count > 0

66718Aug 27 2003 — edited Aug 28 2003
Does anyone know how to do the following correctly?

If (select count(*) from bb_charge_element = 0)
then
PROMPT Error selecting data - update Aborted;
else
"Perform large chunk of code"
end if;


Obviously you can't run a count(*) like this in PL/SQL. Isn't there some method to count if rows in a table exist?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 25 2003
Added on Aug 27 2003
2 comments
571 views