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.

SELECT with MINUS

634069Jun 9 2008 — edited Jun 26 2008
Hi All,

I have two tables with the following records

ORG_TAB
org_id org_name
--------- --------------
1 One
2 Two
3 Three
4 Four

SUP_ORG_TAB
sup_id org_id
---------- ---------
101 1
101 4
102 2
102 3
103 1

Now, my problem is to create a select statement that would show me all the org_id/org_name on ORG_TAB that is not present in the group of sup_id (org_id)

RESULT
sup_id org_name
------------- ------------
101 Two
101 Three
102 One
102 Four
103 Two
103 Three
103 Four

Hopefully you can help me on this.

Cheers,
Roderick

Comments

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

Post Details

Locked on Jul 10 2008
Added on Jun 9 2008
10 comments
2,638 views