You are not logged in.

#1 2015-09-18 06:25:30

hasnain
Administrator
From: Chichawatni
Registered: 2014-10-13
Posts: 8,355
Website

SQL Quiz Question.

http://interviewquestionsanswers.org/quiz/Database http://interviewquestionsanswers.org/qu … L-Database

Question:
What does the following query find?
(SELECT DISTINCT r.sid
FROM boats b, reserves r
WHERE b.bid = r.bid
AND b.color = 'red')
MINUS
(SELECT DISTINCT r.sid
FROM boats b, reserves r
WHERE b.bid = r.bid
AND b.color = 'green')

Option A):
Find the sailor IDs of all sailors who have reserved red boats but not green boats
Option B):
Find the sailor Ids of atmost one sailor who have reserved red boats but not green boats
Option C):
Find the sailor IDs of at least one sailor who have reserved red boats but not green boats

Correct Answer is Option A):
Find the sailor IDs of all sailors who have reserved red boats but not green boats


Failure is the first step towards seccess.

2015-09-18 06:25:30

Advertisement
Ads By Google

Re: SQL Quiz Question.



Board footer