Occasionally I need to create sample data but am not concerned about the selectivity of the data. Rather than using a WHILE loop I use the count argument of the GO command.
INSERT INTO Test (Col1,Col2)
VALUES ('ABC','DEF')
GO 1000
VALUES ('ABC','DEF')
GO 1000
Or
INSERT INTO Test (Col1,Col2)
SELECT 'ABC','DEF'
GO 1000
SELECT 'ABC','DEF'
GO 1000
This is different from a UNION. A union operates under a single batch where this creates 1000 distinct batches.