CBSE Class 12 Informatics Practices Question 85 of 91

JOINS and SET Operations — Question 21

Back to all questions
21
Question

Question 21

Write a SQL query to display all the divnos from both the tables.

Table : Member

EmpIdNamePayDivno
1001Shankhya3400010
1003Ridhima3200050
1002Sunish4500020

Table : Division

DivnoDivnameLocation
10MediaTF02
20DanceFF02
30ProductionSF01
Answer
SELECT DIVNO FROM MEMBER 
UNION ALL
SELECT DIVNO FROM DIVISION;
Output
+-------+
| DIVNO |
+-------+
|    10 |
|    20 |
|    50 |
|    10 |
|    20 |
|    30 |
+-------+