Bird
0
0

Which of the following is the correct syntax to perform a CROSS JOIN between tables Employees and Departments?

easy📝 Syntax Q12 of 15
SQL - Advanced Joins
Which of the following is the correct syntax to perform a CROSS JOIN between tables Employees and Departments?
ASELECT * FROM Employees INNER JOIN Departments;
BSELECT * FROM Employees JOIN Departments ON Employees.id = Departments.id;
CSELECT * FROM Employees CROSS JOIN Departments;
DSELECT * FROM Employees WHERE CROSS JOIN Departments;
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct CROSS JOIN syntax

    The correct syntax uses the keyword CROSS JOIN between two table names without any ON condition.
  2. Step 2: Eliminate incorrect options

    SELECT * FROM Employees JOIN Departments ON Employees.id = Departments.id; uses JOIN with ON condition (not CROSS JOIN). SELECT * FROM Employees INNER JOIN Departments; uses INNER JOIN without ON, which is invalid. SELECT * FROM Employees WHERE CROSS JOIN Departments; uses WHERE incorrectly.
  3. Final Answer:

    SELECT * FROM Employees CROSS JOIN Departments; -> Option C
  4. Quick Check:

    Correct CROSS JOIN syntax = SELECT * FROM Employees CROSS JOIN Departments; [OK]
Quick Trick: CROSS JOIN uses keyword CROSS JOIN without ON clause [OK]
Common Mistakes:
MISTAKES
  • Using JOIN without ON for CROSS JOIN
  • Trying to use WHERE for joining tables
  • Confusing INNER JOIN with CROSS JOIN syntax

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes