Consider a database with three relation instances shown below. The primary…
GATE · 2006 · IT
Consider a database with three relation instances shown below. The primary keys for the Drivers and Cars relation are did and cid respectively and the records are stored in ascending order of these primary keys as given in the tables. No indexing is available in the database.



What is the output of the following SQL query?
select D.dname
from Drivers D
where D.did in (
select R.did
from Cars C, Reserves R
where R.cid = C.cid and C.colour = 'red'
intersect
select R.did
from Cars C, Reserves R
where R.cid = C.cid and C.colour = 'green'
)- A.
Karthikeyan, Boris
- B.
Sachin, Salman
- C.
Karthikeyan, Boris, Sachin
- D.
Schumacher, Senna
Attempted by 134 students.
Sign up free to check your answer
Sign up freeLoading lesson…