I have a query that I need to pass the output from it into aother query. Can this be down all in code?
arep
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Nitesh KejriwalPosted Oct 15, 2012, 3:07 PM
SELECT * FROM tbl1 WHERE tbl1.col1 IN (SELECT col2 FROM tbl2)
SELECT tbl1.* FROM tbl1 JOIN tbl2
ON tbl1.col1 = tbl2.col2