Joins are usually used to fetch data from 2 tables using a common factor from either tables
Is it possible to use a join statement using a table and results of another SQL statement and if it is what is the syntax
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sure, this is called a derived table
such as:
keep in mind that it will run the select for the derived table in entirety, so it can be helpful if you only select things you need.
EDIT: I’ve found that I rarely need to use this technique unless I am joining on some aggregated queries…. so I would carefully consider your design here.
For example, thus far most demonstrations in this thread have not required the use of a derived table.