
CHAPTER 5 Implement: Making Required Application Changes
51
• Inner joins, in which the joined table includes only the rows of the inner
and outer tables that meet the conditions of the on clause. The result set of
a query that includes an inner join does not include any null supplied rows
for the rows of the outer table that do not meet the conditions of the on
clause. The syntax for an ANSI inner join is:
select select_list
from table1 inner join table2
on join_condition
For example:
select au_id, titles.title_id, title, price
from titleauthor inner join titles
and price > 15
• Outer joins, in which the joined table includes all the rows from the outer
table whether or not they meet the conditions of the on clause. If a row
does not meet the conditions of the on clause, values from the inner table
are stored in the joined table as null values. The where clause of an ANSI
outer join restricts the rows that are included in the query result. ANSI
syntax also allows you to write nested outer joins. The syntax for an ANSI
outer join is:
select select_list
from table1 {left | right} [outer] join table2
on predicate [join restriction]
For example:
select au_fname, au_lname, pub_name
from authors left join publishers
on authors.city = publishers.city
For more information see the Transact-SQL User’s Guide at
http://manuals.sybase.com/onlinebooks/group-as/srg1100e/sqlug
.
dsync Function
Beginning with version 12, Adaptive Server initializes UNIX file system
devices using the
dsync option to ensure recovery. This could cause a
performance impact to servers using file system devices for
tempdb. If you
require earlier behavior or performance characteristics, change the
dsync
setting using
sp_deviceattr.
Komentáře k této Příručce