Wednesday, May 30, 2007

How can SQL Server order this result

How can SQL Server order this result?

SELECT '200702'
UNION
SELECT '200701'
UNION
SELECT '200703'
UNION
SELECT '200705'
UNION
SELECT '198001'

output
------
198001
200701
200702
200703
200705

(5 row(s) affected)

No comments: