-
Hi all,
Say I have 2 tables, table1 with columns a,b & c, and table2 with columns a,b, & d.
Now I need to write a query to pull out the records from table1 whose column a & b matches with that of table2. How do I do it?
I know there is a simple way out, but what is it?
Shiva.
-
select table1.a, table1.b, table1.c
from table1, table2
where table1.a = table2.a
and table1.b = table2.b;
HTH
David.
-
select * from table1
where exists
(select null from table2 where
table1.a=table2.a and
table1.b=table2.b)
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
|