|
-
Apr 6th, 2008, 12:49 PM
#1
Thread Starter
Addicted Member
Regarding SQL Server joins
Hi All,
I have two tables. Asume those two tables are as Table1 and Table2.
Table 1 and table 2 have same no of columns and have same values also. the Only Difference is Table1 contains some extra rows than Table2. Briefly i can say Table 1 is the super set of Table2.
For example: Tbale2 contains 7 Rows. and the Table1 contains 10 Rows. This is nothing but, Table 1 contains Table2's rows + 3 extra rows.
Now i want to find those(3) rows which are in Table1 but not in table2.
could you please suggest me how to solve it? can i use any joins?
Thanks & Regards,
raghunadhs
-
Apr 6th, 2008, 01:58 PM
#2
Re: Regarding SQL Server joins
SELECT field1,field2,field3 FROM Table1 WHERE NOT EXISTS
(SELECT id FROM Table2 WHERE Table2.id = Table1.id)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|