10/08/2011

Using "GO" to run an sql batch many times

CREATE TABLE #tmp(
    DATA NVarCHAR(100)
)
GO

INSERT #tmp ( DATA ) VALUES  ( 'Ha ha')
GO 100

SELECT * FROM #tmp AS t

DROP TABLE #tmp        
GO

No comments:

Post a Comment