skip to main content
Reference : SQL Escape Sequences for JDBC : Outer Join Escape Sequences
  

Outer Join Escape Sequences

JDBC supports the SQL-92 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
table-reference
is a database 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'
The driver supports the following outer join escape sequences:
*Left outer joins
*Right outer joins
*Full outer joins
*Nested outer joins