Book Image

SQL Server on Linux

Book Image

SQL Server on Linux

Overview of this book

Microsoft's launch of SQL Server on Linux has made SQL Server a truly versatile platform across different operating systems and data-types, both on-premise and on-cloud. This book is your handy guide to setting up and implementing your SQL Server solution on the open source Linux platform. You will start by understanding how SQL Server can be installed on supported and unsupported Linux distributions. Then you will brush up your SQL Server skills by creating and querying database objects and implementing basic administration tasks to support business continuity, including security and performance optimization. This book will also take you beyond the basics and highlight some advanced topics such as in-memory OLTP and temporal tables. By the end of this book, you will be able to recognize and utilize the full potential of setting up an efficient SQL Server database solution in your Linux environment.
Table of Contents (19 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

JOIN operators


Queries created on a single table can sometimes provide you with the necessary data. However, in practice, most queries require data that is acquired from multiple tables. To create a query that will combine data from multiple tables into a single result set requires you to use a powerful relational operator called JOIN:

Figure 6-1. Two table join operation

The JOIN operator provides you with the functionality to combine data from two or more tables into a single result set. Related tables are created with common columns, usually named primary and foreign key. These keys are used to join related tables to each other. 

The database engine performs table joins in a way that it takes the record from the left table and, usually based on the common field, checks for one or more matches in the right table. There are several types of JOIN operators, but the most common ones are INNER JOIN and OUTER JOIN.

INNER JOIN

An INNER JOIN can be viewed as a cross-section of two sets. Therefore...