0% found this document useful (0 votes)
5 views

EXPERIMENT NO 8 dms

Uploaded by

Anurag Chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

EXPERIMENT NO 8 dms

Uploaded by

Anurag Chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

EXPERIMENT NO-8

Objective: Implementation of union, intersection & minus operation using

MYSQL. Input Table:-

Table1 Table2

Statements:

1. Union: UNION is an SQL operator which combines the result of two or more SELECT
queries and provides the single set in the output.
Syntax: SELECT column_name from table1 UNION SELECT column_name from table2;

2. Union All: It returns the set without removing duplication and sorting the data.
Syntax: SELECT column_name from table1 UNION ALL SELECT column_name from
table2;

3. Intersect: The INTERSECT statement will return only those rows which will be common
to both of the SELECT statements.
Syntax: SELECT column_name from table1 INTERSECT SELECT column_name from
table2;

4. Except: The MINUS operator in SQL is used to return all rows in the first query that are
not present in the second query.
Syntax: SELECT column_name from table1 EXCEPT SELECT column_name from table2;

You might also like