-
'OR' between two tables
I have 2 tables say tableA and tableB
tableA has columns - A,B,C1
tableb has columns - A,B,C2
I need rows from tableA and tableB - A,B,C1,C2
when data is there is either in C1 or C2 or both.
Please suggest how do I write such query.
thanks
-
If it is ANSI compliant database (e.g. SQL 2000)
select t1.a, t1.b, t1.c1, t2.c2
from tableA as t1
full outer join tableB as t2
on t1.a = t2.a and t1.b = t2.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
|
|