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!

query to replace blank or null to zero

694068Feb 1 2011 — edited Feb 1 2011
I have query as below

Select id from table1 where id =32

I dont have value in table1 for id=32.In this case i need to get a result like 0.Basically if nothing is there for that query it shoulh return 0.

of the query is like below
Select id from table1 where id in (12,32,10,42)
the result should be as below. There is no id for 32 and 42 so it should be 0

12
0
10
0

Please help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 1 2011
Added on Feb 1 2011
2 comments
3,367 views