Consider the relational database with the following four schemas and their…

GATE · 2022 · CS · Computer Science & IT

Consider the relational database with the following four schemas and their respective instances.

    Student(sNo, sName, dNo) Dept(dNo, dName)

    Course(cNo, cName, dNo) Register(sNo, cNo)

SQL Query:

SELECT * FROM Student AS S WHERE NOT EXIST

     (SELECT cNo FROM Course WHERE dNo = “D01”

                 EXCEPT
     SELECT cNo FROM Register WHERE sNo = S.sNo) 

The number of rows returned by the above SQL query is___________.

Attempted by 128 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…