Let's look at the very rarely used join, which is CROSS join. The simplest ways of implementing the CROSS JOIN is remove the joining conditions on these tables.
So, for an ultra-quick example, let's take our first example from the CROSS JOIN section earlier in the chapter. The ANSI syntax looked like this:
SELECT * FROM CARMODELS CM CROSS JOIN COLORS C;
To convert it to the old syntax, we just strip out the CROSS JOIN keywords and add a comma:
SELECT * FROM CARMODELS CM, COLORS C;
Sunday, July 27, 2008
CROSS JOIN in SQL Server
Labels:
Joins,
SQL Database,
SQL Server Tips,
Vijaya Kadiyala
Subscribe to:
Post Comments (Atom)
1 comment:
Your site is too good...
thanks for sharing your knowledge
Keerthi..
Post a Comment