Summary

Merging data is the heart of SQL, and it shows in the depth of relational algebra as well as the power and flexibility of SQL. From natural joins to exotic joins, SQL is excellent at selecting sets of data from multiple sources.

The challenge for the SQL Server database developer is to master the theory of relational algebra and the many T-SQL techniques to effectively manipulate the data.

Manipulating data with SELECT is one of the core benefits of SQL Server. Although joins are the most natural method to work with relational data, subqueries are an effective tool for manipulating and querying data as well.

This chapter established the foundation for working with SQL, covering the SELECT statement, expressions, joins, unions, subqueries, and CTEs.

Get Microsoft SQL Server 2012 Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.