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!

how to make count() return 0 instead of NULL ?

547350Jul 24 2007 — edited Jul 24 2007
Hallo
if i have a query like this :
select something ,count(*) from table where something='...' group by something;
and if no rows found,then oracle returns
no rows selected.
Is it somehow possible to change it to the following :
something 0

I.e is it possible to have 0 and not null when there are no results?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2007
Added on Jul 24 2007
5 comments
8,028 views