Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Usage » Joins: Retrieving Data from Several Tables » Key joins

Key joins Next Page

Key joins with an ON clause


When you specify a KEY JOIN and put a join condition in an ON clause, the result is the conjunction of the two join conditions. For example,

SELECT *
FROM A KEY JOIN B
ON A.x = B.y;

If the join condition generated by the key join of A and B is A.w = B.z, then this query is equivalent to

SELECT *
FROM A JOIN B
ON A.x = B.y AND A.w = B.z;