Docsity

Advanced SQL: Learning Relational Set Operators, SQL Joins, Subqueries, and Functions, Slides of Introduction to Database Management Systems

Partial preview of the text

Download Advanced SQL: Learning Relational Set Operators, SQL Joins, Subqueries, and Functions and more Slides Introduction to Database Management Systems in PDF only on Docsity!

Advanced SQL

In this chapter, you will learn:

  • About the relational set operators UNION, UNION ALL, INTERSECT, and MINUS
  • How to use the advanced SQL JOIN operator syntax
  • About the different types of subqueries and correlated queries
  • How to use SQL functions to manipulate dates, strings, and other data

UNION Query Result

UNION ALL Query Result

MINUS Query Results

INTERSECT Alternative

SQL Join Expression Styles

NATURAL JOIN Result

JOIN ON Result

Outer Joins

  • Returns not only rows matching join condition but also rows with unmatched values
  • Three types:
    • Left
    • Right
    • Full

RIGHT JOIN Result

FULL JOIN Result

WHERE Subquery Examples

IN Subquery Example