Course Hero Logo

class activity 27 june.pdf - Activity 1 SET OPERATORS -...

This preview shows page 1 - 23 out of 23 pages.

Activity 1
SET OPERATORS - UNION IT COMBINES THE RESULTS OF TWO SELCT STATEMENTS> IT ELIMINATES DUPLICATE ROWS FROM THE RESULT. Code : Select * from First UNION Select * from Second;
UNION EXAMPLEUnion Example
SET OPERATORS - UNION ALL UNION ALL COMBINES ALL RECORDS FROM BOTH THE QUERIES IT DOES NOT AVOID THE DUPLICATE ENTRIES Code : Select * from First UNION ALL Select * from Second;
Union All Example
SET OPERATORS -INTERSECT•IT IS USED TO COMBINE BOTH SELECT STAEMENTS, BUT IT ONLY RETURNS THE RECORDS WHICH ARE COMMON FROM BOTH SELECT STATEMENTS. •Code : Select * from First INTERSECT Select * from Second;
INTERSECT EXAMPLE Intersect Example
SET OPERATORS - MINUS •IT DISPLAYS THE ROWS WHICH ARE PRESENT IN THE FIRST QUERY BUT ABSENT IN THE SECOND QUERY WITH NO DUPLICATED •

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 23 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Summer
Professor
N/A
Tags
Join, First Union

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture