O'Reilly logo

Microsoft® SQL Server® 2008 Step by Step by Mike Hotek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Retrieving from More Than One Table

Up until this point, all of the queries have been against a single table. However, in most databases, you will need to combine data from more than one table in a single query in order to return the results required by an application. Combining more than one table in a query is accomplished by using a join operator in the FROM clause. There are five valid join operators: INNER JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN, FULL OUTER JOIN, and CROSS JOIN.

Table joins allow you to combine data from more than one table while at the same time providing a filtering capability. An inner join combines two tables based on the criteria in the ON clause while also eliminating any rows from both tables that do not meet the criteria. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required