Skip to content

Instantly share code, notes, and snippets.

@musukvl
Created November 2, 2017 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save musukvl/82f93cbf24a8a51ae8621e314629be98 to your computer and use it in GitHub Desktop.
Save musukvl/82f93cbf24a8a51ae8621e314629be98 to your computer and use it in GitHub Desktop.
SQL Query to insert 100 000 records
declare @i int
set @i = 1
while @i <= 100000
begin
INSERT INTO [dbo].[Log] ([Key], [Data], [UpdatedDate])
VALUES
(convert(nchar(36), NEWID()),
'Some random data:' + convert(nchar(36), NEWID()),
GETDATE())
set @i = @i + 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment