CBSE Class 12 Informatics Practices Question 87 of 91

JOINS and SET Operations — Question 23

Back to all questions
23
Question

Question 23

Write a SQL query to display all the divnos in Member table but not in the Division table.

Table : Member

EmpIdNamePayDivno
1001Shankhya3400010
1003Ridhima3200050
1002Sunish4500020

Table : Division

DivnoDivnameLocation
10MediaTF02
20DanceFF02
30ProductionSF01
Answer
SELECT m.Divno 
FROM Member m 
LEFT JOIN Division d ON m.Divno = d.Divno 
WHERE d.Divno IS NULL;
Output
+-------+
| Divno |
+-------+
|    50 |
+-------+