Using union with other Transact-SQL commands  How joins work


Chapter 4: Joins: Retrieving Data from Several Tables

A join operation compares two or more tables (or views) by specifying a column from each, comparing the values in those columns row by row, and linking the rows that have matching values. It then displays the results in a new table. The tables specified in the join can be in the same database or in different databases.

You can state many joins as subqueries, which also involve two or more tables. See Chapter 5, “Subqueries: Using Queries Within Other Queries.”

When Component Integration Services is enabled, you can perform joins across remote servers. For more information, see the Component Integration Services User’s Guide.





Copyright © 2005. Sybase Inc. All rights reserved. How joins work

View this book as PDF