Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

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

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

@volker, +1 nice question! I use it all time too.

(24 Nov '09, 23:37) Zote

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.

permanent link

answered 24 Nov '09, 20:39

Glenn%20Paulley's gravatar image

Glenn Paulley
accept rate: 43%

...though the latter can also be said when one is using views, stored procedures and the like which also may make the semantics of a SQL statement less obvious.

I appreciate your answer - good products should keep their unique features:)

(25 Nov '09, 08:37) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 24 Nov '09, 17:51

question was seen: 2,849 times

last updated: 24 Nov '09, 20:39