You want to compare all columns of table A to columns with matching names in table B. You
want to select the rows where those have the same values on both tables.
Which query accomplishes this?
A.
SELECT * FROM tableA. tableB
B.
SELECT * FROM tableA JOIN tableB
C.
SELECT * FROM table A INNER JOIN tableB
D.
SELECT * FROM tableA NATURAL JOIN tableB
E.
SELECT & FROM tableA STRAIGHT JOIN tableB
correct is D
D
CREATE TABLE t1 (i INT, j INT);
CREATE TABLE t2 (k INT, j INT);
INSERT INTO t1 VALUES(1,1),(2,3);
INSERT INTO t2 VALUES(1,1),(4,5);
SELECT * FROM t1, t2; #A#
SELECT * FROM t1 JOIN t2; #B#
SELECT * FROM t1 INNER JOIN t2; #C#
SELECT * FROM t1 NATURAL JOIN t2; #D#
SELECT * FROM t1 STRAIGHT_JOIN t2; #E#
D
D