Bird
0
0

Which of the following is the correct syntax for a LEFT JOIN in SQL?

easy📝 Syntax Q12 of 15
SQL - LEFT and RIGHT JOIN
Which of the following is the correct syntax for a LEFT JOIN in SQL?
ASELECT * FROM table1 LEFT ON JOIN table2 WHERE table1.id = table2.id;
BSELECT * FROM table1 JOIN LEFT table2 ON table1.id = table2.id;
CSELECT * FROM table1 LEFT JOIN table2 ON table1.id = table2.id;
DSELECT * FROM table1 LEFT JOIN table2 WHERE table1.id = table2.id;
Step-by-Step Solution
Solution:
  1. Step 1: Review correct LEFT JOIN syntax

    The correct syntax is: SELECT columns FROM left_table LEFT JOIN right_table ON condition;
  2. Step 2: Identify syntax errors in other options

    Options A, B, and D misuse keywords or omit ON clause, causing syntax errors.
  3. Final Answer:

    SELECT * FROM table1 LEFT JOIN table2 ON table1.id = table2.id; -> Option C
  4. Quick Check:

    LEFT JOIN syntax = SELECT ... LEFT JOIN ... ON ... [OK]
Quick Trick: LEFT JOIN always uses ON to specify join condition [OK]
Common Mistakes:
MISTAKES
  • Swapping JOIN and LEFT keywords
  • Using WHERE instead of ON for join condition
  • Omitting ON clause

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes