|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 5:44 AM
Points: 176,
Visits: 128
|
|
I have tested this. In context of SQL Server 2000 it is correct answer as by you. But In SQL Server 2008 answer will be 1,2,3,4.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Tuesday, April 19, 2011 1:59 AM
Points: 1,042,
Visits: 234
|
|
I executed the scriptin SQL Server 2005, Got following output -
What you see... ----------------------- print 1 -- Comment one print 2 -- Comment two print 3 -- Comment three print 4 is not what you get! ----------------------- 1 2 3 4
I want to understand why the output will be 1, 3, 4?? Can anyone explain how it is correct?
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 6:28 AM
Points: 1,258,
Visits: 4,259
|
|
tejaswini.patil (1/26/2011) I want to understand why the output will be 1, 3, 4?? Can anyone explain how it is correct?
Have you tried reading the rest of the comments? It's already been pointed out multiple times that the answer as given only applies to SQL 2000--later versions produce 1,2,3,4.
|
|
|
|
|
SSChasing Mays
      
Group: General Forum Members
Last Login: Sunday, March 04, 2012 4:02 AM
Points: 660,
Visits: 134
|
|
I suppose it would be SQL 2000 vs SQL 2005 and the bug has been fixed, but I want that point.
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Thursday, June 21, 2012 1:29 AM
Points: 62,
Visits: 67
|
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 5:11 PM
Points: 7,104,
Visits: 7,168
|
|
terrykzncs (4/29/2011)
I suppose it would be SQL 2000 vs SQL 2005 and the bug has been fixed, but I want that point.  Not quite. It is indeed SQL 2000 vs SQL 2005. But rather than a bug having been fixed, a really stupid bug has been added - intentionally. See http://www.sqlservercentral.com/Forums/FindPost1038756.aspx for a simple explanation.
Tom Que conclure à la fin de tous mes longs propos? C'est que les préjugés sont la raison des sots. (Voltaire, 1756)
|
|
|
|