Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Joins between tables with different where condition

$
0
0
Hi,
Can we join two tables with different where conditions.
For example there is one table a and another table b.
Now after selection of data from one table like
select * from table a where a.col1 = 3 and a.col2 > 0
Now second selection is like
select * from table b where b.col1 = 3 and b.col2 > 0

Then we then join the two tables based on some condition a.col4=b.col4
and a.col5 = b.col5.

Can we do the join between two or if there is any otherway to do it.

Biswa

Viewing all articles
Browse latest Browse all 13329

Trending Articles