Outer Join Escape Sequences


JDBC supports the SQL92 left, right, and full outer join syntax. The escape sequence for outer joins is:

{oj outer-join} 

where outer-join is:

table-reference {LEFT | RIGHT | FULL} OUTER JOIN  
{table-reference | outer-join} ON search-condition 

where:

table-reference is a table name.

search-condition is the join condition you want to use for the tables.

Example:
SELECT Customers.CustID, Customers.Name, Orders.OrderID, Orders.Status 
  FROM {oj Customers LEFT OUTER JOIN 
        Orders ON Customers.CustID=Orders.CustID} 
  WHERE Orders.Status='OPEN' 

Table D-2 lists the outer join escape sequences supported by the Microsoft SQL Server driver.

Table D-2. Outer Join Escape Sequences Supported
Data Store
Outer Join Escape Sequences
Microsoft SQL Server
Left outer joins
Right outer joins
Full outer joins
Nested outer joins


Previous Document Previous Page Next Document Next Page Synchronize TOC Synchronize with Contents