KnowledgeBoat Logo
|

Informatics Practices

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

Table : Member

EmpIdNamePayDivno
1001Shankhya3400010
1003Ridhima3200050
1002Sunish4500020

Table : Division

DivnoDivnameLocation
10MediaTF02
20DanceFF02
30ProductionSF01

SQL Joins & Grouping

1 Like

Answer

SELECT D.Divno
FROM Division D
LEFT JOIN Member M ON D.Divno = M.Divno
WHERE M.Divno IS NULL;
Output
+-------+
| Divno |
+-------+
|    30 |
+-------+

Answered By

2 Likes


Related Questions