JDBC Reference,
Page 28 of 30
|

|

[top]  [prev]
  [next]
Documentation Top

Global Index
Reference Manual
TOC Index
Grammar index
Developer's Guide
TOC
Index
Tuning Cloudscape
TOC Index
|
oj
Cloudscape interprets the JDBC escape syntax for outer joins (and all join operations) as equivalent to the correct SQL-J syntax for outer joins or the appropriate join operation.
For information about join operations, see JOIN operation.
Syntax
{oj JOIN operation [JOIN operation ]* }
Equivalent to
JOIN operation [JOIN operation ]*
Example
-- outer join
SELECT *
FROM
{oj Countries LEFT OUTER JOIN Cities ON
(Countries.country_ISO_code=Cities.country_ISO_code)}
-- another join operation
SELECT *
FROM
{oj Countries JOIN Cities ON
(Countries.country_ISO_code=Cities.country_ISO_code)}
-- a TableExpression can be a joinOperation. Therefore
-- you can have multiple join operations in a FROM clause
SELECT country, city.getName(), hotel_name, normal_rate
FROM {oj Cities LEFT OUTER JOIN Countries
ON Countries.country_ISO_code=Cities.country_ISO_code
INNER JOIN Hotels
ON Cities.city_id=Hotels.city_id }
|