GATEverse Practice, past papers & mock tests
GATE 2014 · session-3
Database ManagementStructured Query Language (SQL)mediumMCQ2 marks
Consider the following relational schema: employee(empId, empName, empDept) customer(custId, custName, salesRepId, rating) Primary keys: employee.empId and customer.custId. salesRepId is a foreign key referring to empId of the employee relation. Assume that each employee makes a sale to at least one customer. What does the following query return? SELECT empName FROM employee E WHERE NOT EXISTS (SELECT custId FROM customer C WHERE C.salesRepId = E.empId AND C.rating <> 'GOOD');
Save your progress

Related Database Management PYQs