Skip to main contentSkip to solution

Identify the correct statement(s) based on operations on relations: 'T1' AND 'T2'

(A) SELECT * FROM T1,T2 is used to find Cartesian product on two tables.

(B) SELECT * FROM T1 AND SELECT * FROM T2 is used to find Cartesian product on two tables.

(C) SELECT * FROM T1,T2 is used to find equi join on two tables.

(D) SELECT * FROM T1 JOIN SELECT * FROM T2 is used to find equi join on two tables.

Solution

✅ Correct Option: 3

SELECT * FROM T1, T2 lists both tables in the FROM clause with no condition, so every row of T1 is paired with every row of T2. This is the Cartesian product, so (A) is correct.


(C): an equi join needs an equality condition such as WHERE T1.id = T2.id\text{WHERE T1.id = T2.id} (or JOIN ... ON\text{JOIN ... ON}). Without it, the comma form gives a Cartesian product, not an equi join.

(B) and (D): these are not valid SQL. AND joins conditions, not queries, and JOIN needs table names, not SELECT statements written like this.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question