Sybase Adaptive Server Anywhere Reference page 551

Table of Contents

Advertisement

Standards and
compatibility
Examples
The correlation name is used to give a temporary name to the table for this
SQL statement only. This is useful when referencing columns from a table
with a long name. The correlation name is also necessary to distinguish
between table instances if you reference the same table more than once in the
same query. If no correlation name is specified, the table name is used as the
correlation name for the current statement.
If the same correlation name is used twice for the same table in a table
expression, that table is treated as if it were listed only once. For example, in:
SELECT *
FROM sales_order
KEY JOIN sales_order_items,
sales_order
KEY JOIN employee
the two instances of the sales_order table are treated as one instance, this is
equivalent to:
SELECT *
FROM sales_order
KEY JOIN sales_order_items
KEY JOIN employee
Whereas:
SELECT *
FROM Person HUSBAND, Person WIFE
would be treated as two instances of the Person table, with different
correlation names HUSBAND and WIFE.
You can supply SELECT statements instead of table or view names in the
FROM clause. This allows you to use groups on groups, or joins with
groups, without creating a view. The tables that you create in this way are
derived tables.
Entry level feature.
SQL/92
Sybase
The JOIN clause is not supported in Adaptive Server
Enterprise. Instead, you must use the WHERE clause to build joins.
The following are valid FROM clauses:
...
FROM employee
...
...
FROM employee NATURAL JOIN department
...
...
FROM customer
Chapter 9 SQL Statements
533

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Adaptive Server Anywhere and is the answer not in the manual?

Questions and answers

Table of Contents