Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Digvijay Singh Yadav

RA1911031010055
CSE-IT(K2)
Ex. No: 7 SET OPERATORS

AIM:
To write SQL queries to execute different Set Operators for Art gallery
database system(Gallery Table, Painter Table and Painting Table).
QUERIES:
1)UNION

SELECT PTR_NUM FROM PAINTER


UNION
SELECT PTR_NUM FROM PAINTING
ORDER BY PTR_NUM;
2) UNION ALL
SELECT PTR_NUM
FROM PAINTER
UNION ALL
SELECT PTR_NUM
FROM PAINTING
ORDER BY PTR_NUM;
3) MINUS
SELECT GAL_NUM
FROM GALLERY
MINUS
SELECT GAL_NUM
FROM PAINTING;
4) INTERSECT
SELECT GAL_NUM
FROM GALLERY
INTERSECT
SELECT GAL_NUM
FROM PAINTING;
TABLES:

OUTPUT SCREENSHOT:
RESULT:
The Inbuilt Functions were successfully executed on the following given tables of
art gallery
database.

You might also like