DEV Community

andreasneuman
andreasneuman

Posted on

Different types of JOINS in SQL Server

JOINS fundamentals

In relational databases, such as SQL Server, Oracle, MySQL, and others, data is stored in multiple tables that are related to each other with a common key value. Accordingly, there is a constant need to extract records from two or more tables into a results table based on some condition. In SQL Server, this can be easily accomplished with the SQL JOIN clause.

JOIN is an SQL clause used to query and access data from multiple tables, based on logical relationships between those tables.
In other words, JOINS indicate how SQL Server should use data from one table to select the rows from another table.

Basic SQL JOIN types

Enjoying JOINS with SQL Complete

SQL Server JOINS are vitally important to master. As you progress from a database beginner to a more advanced user, you’ll continually need to fetch and combine data from more than one table. At this point, SQL Complete comes to the aid. Its code completion works well even for complex JOIN statements. You don’t need to memorize multiple column names or aliases, dbForge SQL Complete will suggest a full JOIN clause based on foreign keys, or conditions based on column names. These suggestions are available after the JOIN and ON keywords.

More than that, SQL Complete can prompt a complete SQL JOIN statement when you combine tables based on foreign keys. You can select a JOIN statement from the prompt list manually, in case you need a specific JOIN operation.

Top comments (1)

Collapse
 
linuxguist profile image
Nathan S.R.

Thanks for this very useful post. I just wanted to add that, there is a very easy way now, to test all the SQLs described here, using the free & portable tools, mentioned in my latest post here : dev.to/linuxguist/learn-sql-quickl...