Wednesday, June 23, 2010

Syntax of inner join

select * from foo

inner join (

select 5 as bar

union all select 6

union all select 7

) as x on foo.bar = x.bar