public
anonymous / gist:1335157
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
SET NOCOUNT ON
 
CREATE TABLE #T(X INT)
SELECT MAX(X) FROM #T WHERE X < 0
 
INSERT INTO #T VALUES(-1)
 
SELECT MAX(X) FROM #T WHERE X < 0
 
INSERT INTO #T VALUES(2)
 
SELECT MAX(X) FROM #T WHERE X < 0
 
INSERT INTO #T VALUES(3)
 
SELECT MAX(X) FROM #T WHERE X < 0
 
INSERT INTO #T VALUES(4)
 
SELECT MAX(X) FROM #T WHERE X < 0
 
INSERT INTO #T VALUES(5)
 
SELECT MAX(X) FROM #T WHERE X < 0
 
INSERT INTO #T VALUES(6)
 
SELECT MAX(X) FROM #T WHERE X < 0
 
INSERT INTO #T VALUES(7)
 
SELECT MAX(X) FROM #T WHERE X < 0
 
DROP TABLE #T

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.