Consider two tables stream_details and trainer_details.

stream_details:

stream_id | stream_name

--------------+-------------

101 | Open source

102 | Java

103 | Microsoft

104 | Testing

trainer_details:

trainer_id | trainer_name | trainer_salary | stream_id

--------------+--------------------+--------------------+---------

1 | John | 60000 | 101

2 | Peter | 80000 | null

3 | Mike | 90000 | 103

4 | Henry | 70000 | null

Phil, a database admin has executed below query as per business requirement. What would be the output?

SELECT stream_id, stream_name FROM stream_details S WHERE EXISTS (SELECT * FROM trainer_details T WHERE T. stream_id = S. stream_id);

stream_id | stream_name

--------------+-------------

   101        | Open source

   103        | Microsoft

stream_id | stream_name

--------------+-------------

   101        | Open source

stream_id | stream_name

--------------+-------------

   102        | Java

   104        | Testing

Error

Verified Answer
Correct Option - a

To get all Infosys Certified PostgreSQL Associate Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in