Given the following two table definitions, select one SQL statement which will cause an error.
CREATE TABLE sample1 (id INTEGER, data TEXT);
CREATE TABLE sample2 (id INTEGER);
- SELECT s1.id FROM sample1 s1;
- SELECT s1.id FROM sample1 AS s1;
- SELECT data FROM sample1 AS s1, sample2 AS s2
WHERE s1.id = 1 AND s2.id = 2;
- SELECT id, data FROM sample1 AS s1, sample2 AS s2
WHERE s1.id = s2.id;
- SELECT s1.id, s1.data FROM sample1 AS s1, sample2 AS s2
WHERE s1.id = s2.id;
Reveal Solution
Next Question