Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> sql help
Hello all,
I'm having difficulties completing this query. I have a table with a primary key of ID1 and a foriegn key of ID2. What I want my qeury to do is return one primary key (ID1) for each foreign key. Example: From the table below -
ID1 ID2
---------- ----------
4198 5511601 31380 5511601
15068 23544883 42821 23544883
ID1 ID2
---------- ----------
1418794 23544883
Query with a result of -
ID1 ID2
---------- ----------
4198 5511601 15068 23544883
I've tried using group by and can't figure out what I need to do. Any help would be great!!
TIA Brian Received on Tue May 07 2002 - 12:41:18 CDT
![]() |
![]() |