July 2015
Intermediate to advanced
972 pages
21h 39m
English
CHAPTER 4
![]()
Querying from Multiple Tables
It is the rare database that has all its data in a single table. Data tends to be spread over multiple tables in ways that optimize storage and ensure consistency and integrity. Part of your job when writing a query is to deploy and link together T-SQL operations that can operate across tables in order to generate needed business results.
4-1. Correlating Parent and Child Rows
Problem
You want to bring together data from parent and child tables. For example, you have a list of people in a parent table named Person, and a list of phone numbers in a child table named PersonPhone. Each ...
Read now
Unlock full access