Download Using the JOIN Operator

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Using the JOIN Operator
Wagner Crivelini
IBM GBS Brazil
Brazil
1
© 2011 IBM Corporation
Relational Model – a Database Diagram
A simplified library’s database model
2
© 2011 IBM Corporation
Joining Tables – always 2 at a time
Borrower.Borrower_ID = Loan.Borrower_ID
TIP: when writing the SQL statement, use aliases for both tables
3
© 2011 IBM Corporation
Types of Joins
• INNER JOIN
• LEFT OUTER JOIN (or LEFT JOIN for short)
• RIGHT OUTER JOIN (or RIGHT JOIN for short)
• FULL OUTER JOIN (or FULL JOIN for short)
• CROSS JOIN
4
© 2011 IBM Corporation
Related documents