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 - restricting rows based on specific combinations of columns

SelvaganapathySep 4 2008 — edited Sep 4 2008
I have two columns in two different tables T1 and T2 like below

T1.Column1 T2.Column2
------------ ---------------
1 a
2 b
3 c
4 d
5 e

I need all the combinations of values in the columns, which I can choose like

select T1.Column1, T2.Column2 from T1, T2 ------ (Without specifying any join ie. cartesian product)

But, in those, combinations, I need to restrict the following combinations, from not being selected - (1,b), (1,c),(3,b), in the same sql, or using a subquery. I am not able to achieve this after several attempts. Can any one help?
This post has been answered by Karthick2003 on Sep 4 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 2 2008
Added on Sep 4 2008
7 comments
665 views