Which of the following query finds the names of the sailors who have reserved at least one boat?
A. SELECT DISTINCT s.sname FROM sailors s, reserves r WHERE s.sid = r.sid;
B. SELECT s.sname FROM sailors s, reserves r WHERE s.sid = r.sid;
C. SELECT DISTINCT s.sname FROM sailors, reserves WHERE s.sid = r.sid;
D. None of These
Answer: Option A
Solution(By Examveda Team)
To find the names of sailors who have reserved at least one boat, you should use the SQL query SELECT DISTINCT s.sname FROM sailors s, reserves r WHERE s.sid = r.sid; (Option A). This query joins the "sailors" and "reserves" tables on the "sid" column and selects the distinct "sname" (sailor names) from the "sailors" table. The use of DISTINCT ensures that you only get unique sailor names. Option A is the correct choice for achieving this result.A. Structured Query Language
B. Structured Query List
C. Simple Query Language
D. None of these
Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?
A. Data Definition Language(DDL)
B. Data Manipulation Language(DML)
C. Both of above
D. None
Which operator performs pattern matching?
A. BETWEEN operator
B. LIKE operator
C. EXISTS operator
D. None of these
What operator tests column for the absence of data?
A. EXISTS operator
B. NOT operator
C. IS NULL operator
D. None of these
Join The Discussion