DECLARE @i1 int, @i2 int, @i3 int, @i4 int, @i5 int
SELECT @i1 = 1, @i2 = 2, @i3 = 3, @i4 = 4, @i5 = 5
SELECT * FROM
(SELECT @i1 AS i UNION ALL SELECT @i2 UNION ALL
SELECT @i3 UNION ALL SELECT @i4 UNION ALL SELECT @i5) AS tbl
This page was last updated on May 01, 2006 04:28 PM.