
SQL Joins Explained: Case Example
Structured Query Language(SQL) is a computer language for storing, manipulating, and retrieving data stored in a relational database. SQL Joins are like clauses used to combine records from two or more tables in a database, just as the name(join) means. In this article, you will learn, using a case example, the different types of joins, when, and how they are used. Be sure to check for “ bonus joins” included at the end of the article. Example Data We will use data from these 2 tables to show various ways to display employees from John Smith's company. Departments Table Department_Id Department_Name 1 Executive 2 HR 3 Sales 4 Support 5 Sales 6 Research Employees Table Employee_Id Full_Name Department_Id Job_Role Manager_Id 1 John Smith 1 CEO Null 2 Sarah Goodes 1 CFO 1 3 Wayne Ablett 1 CIO 1 4 Michelle Carey 2 HR Manager 1 5 Chris Matthews 3 Sales Manager 2 6 Andrew Judd 4 Development Manager 3 7 Danielle McLeod 5 Support Manager 3 8 Matthew Swan 2 HR Representative 4 9 Stephanie Richa
Continue reading on Dev.to
Opens in a new tab


