Joins/Subqueries/Views

Topics 

  • Join 
  • Table relationship 
    • Primary key and foreign key 
    • Types of relationship 
    • Referential integrity 
    • Automatic delete and update 
  • Union 
  • Subquery 
  • View

Join

What is Join? 

  • A SQL JOIN clause combines records from two or more tables to produce a “result set” 
    • A JOIN is a means for combining fields from two tables by using values common to each 
    • Specified in WHERE clause 
  • The joined tables are typically related with foreign keys

Types of Join 

  • Cross join 
  • Inner join 
  • Outer join 
  • Self join

 

Download course content