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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to Get ID Where each value of Flag Field is 1 for that ID

478924Dec 26 2005 — edited Dec 30 2005
I have a table in the following form


ID Flag
1 1
1 1
1 0
2 1
2 1


I have to write a query that will return the ID Whose All Flags Values are 1. i.e if i run the query on the above table it must return 2.
If there is Flag for a specific ID equal to 0 it must return empty.

Please Help me.

Regards,

Ahmad Jalil Qarshi

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 27 2006
Added on Dec 26 2005
20 comments
3,291 views