PostgreSQL_CE
PGCES-02 · Question #136
A set of tables are defined as follows: t1 t2 How many rows are returned by executing the following SQL statement? SELECT * FROM t1 WHERE EXISTS (SELECT name FROM t2 WHERE t1.id = t2.id);
The correct answer is B. 2 rows. See the full explanation below for the reasoning.
Question
A set of tables are defined as follows:
t1 t2 How many rows are returned by executing the following SQL statement? SELECT * FROM t1 WHERE EXISTS (SELECT name FROM t2 WHERE t1.id = t2.id);
Options
- A0 rows
- B2 rows
- C3 rows
- D5 rows
- E6 rows
How the community answered
(44 responses)- A16% (7)
- B73% (32)
- C5% (2)
- D5% (2)
- E2% (1)
Community Discussion
No community discussion yet for this question.