Besides the known pros and cons of KEY JOIN, I like this clause because it saves me coding (and reading) time by using semantics I have already put into my table's FK definitions.
AFAIK, however, KEY JOIN is still a vendor extension.
Are there any plans to put this into an SQL standard?
(Just because it's nice to use a standard SQL feature.)
asked 24 Nov '09, 17:51
I am unaware of any proposals at the present time to incorporate KEY JOIN into the ISO SQL Standard. As far as I know, SQL Anywhere is the only vendor that offers the KEY JOIN syntax. Hence it would be challenging to have KEY JOINs accepted by the other vendors in the INCITS DM32.2 committee as a worthy addition to the SQL standard.
I recognize that you (and several others) appreciate the conciseness of the KEY JOIN syntax. The other advantage is that with KEY JOIN there is no fear of unintentionally omitting a join predicate when the foreign/primary key is composite. A disadvantage, however, is that one is unable to determine precisely how 2 tables will be joined by looking at the SQL query alone; to get the entire picture, the developer must query the catalog tables (or use SQL Anywhere's REWRITE() function) to determine what the joined attributes are.
answered 24 Nov '09, 20:39