My long term memory for SQL Server related information.
What would the output of the SELECT be?Now my first reaction was obviously 3, 2, 1 and this would be correct on SQL Server 2005 but unfortunately SQL Server 2000 gives you 1, 2, 3.
Quite frankly I prefer the SQL Server 2005 method anyway ;-)I lost :-(
Here is some more funcreate table #test (id int identity,AlphaChar char(1))insert into #testselect 'a' union allselect 'z' union allselect 'b' union allselect 'y' select id as AlphaChar from #testorder by AlphaCharselect id as AlphaChar,AlphaChar from #testorder by AlphaChar
Hehe very nice :-)On SQL Server 2005 it does what I personally like the most...Msg 209, Level 16, State 1, Line 12Ambiguous column name 'AlphaChar'.Thanks for the nice addition.
Post a Comment
↑ Grab this Headline Animator