Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual page 181

Table of Contents

Advertisement

Specifying the join type when creating a join index
Specifying relationships when creating a join index
Alternatively, you could create the table without the
then add the foreign key later, as is done in the following
statement:
ALTER TABLE DBA.sales_order
ADD FOREIGN KEY ky_so_customer (cust_id)
REFERENCES DBA.customer (id) UNENFORCED
The join type is always
FULL OUTER
also need to do one of the following:
If you are joining equivalent columns with the same name from two tables,
you specify that it is a
If you are joining columns based on keys, you must also have specified the
relationship in the underlying tables as a
.
PRIMARY KEY
If you are joining equivalent values (an equijoin) in columns from two
tables, you specify an
These rules conform to ANSI syntax requirements.
For non-key joins, the order in which you specify tables when you create the
join index determines the hierarchy of the join relationship between the tables.
The
CREATE JOIN INDEX
hierarchy:
List each table starting with the lowest one in the hierarchy, and spell out
the join relationship between each pair of tables. The last table in the list
will be the top table in the hierarchy. For example, in Figure 4-1 on
page 153, F is the top table, E is below it, and C is at the bottom of the
hierarchy. You could specify the join hierarchy for these three tables as
follows:
C FULL OUTER JOIN E FULL OUTER JOIN F
CHAPTER 4
Adaptive Server IQ Indexes
, the keyword
OUTER
.
NATURAL JOIN
FOREIGN KEY
clause.
ON
statement supports two ways to specify the join
clause, and
REFERENCES
ALTER TABLE
being optional. You
that references a
161

Advertisement

Table of Contents
loading

Table of Contents