Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Chapter 3 Using Aggregates, Grouping,
and Sorting [Table of Contents] Chapter 5 Subqueries: Using Queries Within
Other Queries

Transact-SQL User's Guide

[-] Chapter 4 Joins: Retrieving Data from Several Tables

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.

[-] How joins work
Join syntax
Joins and the relational model
[-] How joins are structured
The from clause
[+] The where clause
How joins are processed
Equijoins and natural joins
Joins with additional conditions
Joins not based on equality
Self-joins and correlation names
[-] The not-equal join
Not-equal joins and subqueries
Joining more than two tables
[-] Outer joins
Inner and outer tables
Outer join restrictions
Views used with outer joins
[+] ANSI Inner and outer joins
[+] ANSI outer joins
Transact-SQL outer joins
How null values affect joins
Determining which table columns to join


Combining queries:
the union operator [Table of Contents] How joins work