Run this from any database since it does not use any existing table!
2013-08-22
17,197 reads
Run this from any database since it does not use any existing table!
Answer: SELECT (10*a.x + b.y) + 1 as z FROM (SELECT 0 as x union all SELECT 1 union all SELECT 2 union all SELECT 3 union all SELECT 4 union all SELECT 5 union all SELECT 6 union all SELECT 7 union all SELECT 8 union all SELECT 9 ) as a CROSS JOIN (SELECT 0 as y union all SELECT 1 union all SELECT 2 union all SELECT 3 union all SELECT 4 union all SELECT 5 union all SELECT 6 union all SELECT 7 union all SELECT 8 union all SELECT 9 ) as b ORDER BY 1