What’s the difference between this:
SELECT *
FROM table1, table2
WHERE table1.primary_id = table2.primary_id
And this:
SELECT *
FROM table1
FULL JOIN table2 ON table1.primary_id = table2.primary_id
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.
The first query is an implicit
INNER JOIN, you should always use the explicit syntax. In that case, the query will return the records that are in table1 and in table2. The second query will return all the records of both tables, showingNULLif there are no match on the other.