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;
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 in the case of generated join conditions in table expressions using commas.
For information about how commas work with generated join conditions, see Key joins of table expressions.
In the syntax of star joins, commas have a special use. For more information, see Duplicate correlation names in joins (star joins).
|Envoyer votre avis sur cette page par email.||Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|