SQL-J Language Reference,
Page 19 of 118


[top]
[prev]
[next]
Documentation Top
Global Index
Reference Manual
TOC Index
Grammar index
Developer's Guide
TOC Index
Tuning Cloudscape
TOC Index

CROSS JOIN

A CROSS JOIN is one of the JOIN operations. It provides a way to specify a Cartesian product between two tables: it does not allow you to specify the join column. You can, however, specify a WHERE clause.

Syntax

TableExpression CROSS JOIN TableExpression

Example

SELECT *
FROM Flights CROSS JOIN Airlines
WHERE orig_airport = 'SFO'
AND dest_airport = 'LAX'
SELECT *
FROM (VALUES (1, 2), (3, 4)) AS Peter(apples, oranges)
CROSS JOIN
(VALUES ('a', 'b'), ('c', 'd')) AS Paul (bananas, pineapples)
APPLES     |ORANGES    |BANANAS    |PINEAPPLES
--------------------------------------------------
1          |2          |a          |b
1          |2          |c          |d
3          |4          |a          |b
3          |4          |c          |d
[top]
[prev]
[next]


Cloudscape Version 3.0
For technical support, go to: www.cloudscape.com and click Support.
Copyright © 1998 and 1999 Cloudscape, Inc. All rights reserved.