ISRO 2013 · SQL Queries

MCQ · 1 mark · Problem DBMS-SQL-0101

Consider the following relational schema:Suppliers (sid:integer, sname:string, saddress:string)Parts (pid:integer, pname:string, pcolor:string)Catalog (sid:integer, pid:integer, pcost:real)What is the result of the following query?
 (SELECT Catalog.pid from Suppliers, Catalog
WHERE Suppliers.sid = Catalog.sid)
MINUS
(SELECT Catalog.pid from Suppliers, Catalog
WHERE Suppliers.sname <> 'Sachin' and Suppliers.sid = Catalog.sid)
  1. A
    Pid of parts supplied by all except Sachin
  2. B
    Pid of parts supplied only by Sachin
  3. C
    Pid of parts available in catalog supplied by Sachin
  4. D
    Pid of parts available in catalog supplied by all except Sachin

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solutionOfficial GATE Answer Key: Option B.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/43857/isro-2013-24

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com