Visual Guide to SQL Joins

Nick K.
3 min readApr 19, 2021

SQL was developed in the 1970’s by researchers at IBM. They sought to create a way to query data stored in IBM’s database management system, “System R.” In doing so, they came up with the concept of relational databases, a series of tables that are linked in some manner. Their proposed method for querying these relational databases was SEQUEL, the Structured English QUEry Language.

Today SQL is widely used, the relational databases that undergird many of the web pages and apps that we see require a way to query the relevant data. Despite the many “flavors” of SQL, such as: Oracle, MySQL, and MS SQL Server, the primary syntax stems from the ANSI (American National Standards Institute) approved version.

Standard SQL commands such as “SELECT”, “INSERT”, “UPDATE”, “DELETE” can allow one to accomplish almost everything they would need to with a database. Today we will focus on querying, or selecting, data from multiple tables using different types of joins.

Here are the two tables we will be joining:

The “COUNTRY” table has a key called “CODE” which corresponds to “COUNTRYCODE” key on the “CITY” table.

Types of Joins

--

--