I was asked this question during one of my interviews. Can you do JOIN using UNION keyword? Can you do UNION using JOIN keyword?
Can you give me an example of how to do this if possible?
Printable View
I was asked this question during one of my interviews. Can you do JOIN using UNION keyword? Can you do UNION using JOIN keyword?
Can you give me an example of how to do this if possible?
What was your answer?
As you may remember UNION is used to merge two datasets which columns have identical data types while JOIN is used to filter datasets.
I could not answer it.. I think its possible!
To clarify
1. I should get same output as JOIN without using JOIN keyword, but using UNION Keyword?
2. I should get same output as UNION without using UNION keyword, but using JOIN Keyword?
This is very easy question and a good one for job interview. It help fikter children that do not realy understand the operation of JOIN and UNION :-)
you can look at this article at Microsoft Technet site, for a full exampls (UNION using JOIN and vice versa)
http://social.technet.microsoft.com/...play-time.aspx
Hope this will help you :-)