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 CROSS JOIN B CROSS JOIN C WHERE A.x = B.y; |
and
SELECT * FROM A, B, 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.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |