Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 4729

Issue with joins

$
0
0

Hello everyone,

I am joining 4 tables and in where clause, i wrote a sub query.

SELECT t1.col1,t2.col2,t1.col3 FROM table1 t1

INNER JOIN table2 t2 ON t1.col4=t2.col4

INNER JOIN table3 t3 ON t2.col3=t3.col3

INNER Join table4 t4  ON t3.col2=t4.col2

WHERE t1.col5 IN ( SELECT col4,col5 from table5)

Now, i wrote a query "SELECT colx,coly from table5)".

Is there any way of getting colx or coly which belongs to this table table5 (which is not involved in join) in the output?


Thanks and Regards, Readers please vote for my posts if the questions i asked are helpful.


Viewing all articles
Browse latest Browse all 4729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>