Tuesday, February 28, 2012

example of cross join


select * from 
(select 1 id , 'ball' item
 union select 2 id , 'bat' item
 union select 3 id , 'glove' item
) as a
cross join
(select 'New York' location
 union select 'Philadelphia' location
 union select 'Miami' location )
as b



No comments:

Post a Comment