A comma works like a join operator, but is not one. A comma creates a cross product exactly as the keyword CROSS JOIN does. However, join keywords create table expressions, and commas create lists of table expressions.
In the following simple inner join of two tables, a comma and the keywords CROSS JOIN are equivalent:
SELECT * FROM A, B, C WHERE A.x = B.y; |
SELECT * FROM A CROSS JOIN B CROSS JOIN C WHERE A.x = B.y; |
Generally, you can use a comma instead of the keywords CROSS JOIN. The comma syntax is equivalent to cross join syntax, except for generated join conditions in table expressions using commas.
In the syntax of star joins, commas have a special use.
![]() |
Discuter à propos de cette page dans DocCommentXchange.
|
Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0 |