CREATE TABLE Nums(n INT NOT NULL PRIMARY KEY)

SET NOCOUNT ON
DECLARE @n AS INT

SET @n = 1
BEGIN TRAN
  WHILE @n <= 1000
  BEGIN
    INSERT INTO Nums VALUES(@n)
    SET @n = @n + 1
  END
COMMIT TRAN