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

SQL Anywhere 11.0.1 (Français) » SQL Anywhere Server - SQL Usage » Querying and Modifying Data » Joins: Retrieving data from several tables » Key joins

 

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;