Skip to content

Instantly share code, notes, and snippets.

@ghotz
Created October 9, 2019 14:59
Show Gist options
  • Select an option

  • Save ghotz/485c07c118b32717dffeb0d464027a5b to your computer and use it in GitHub Desktop.

Select an option

Save ghotz/485c07c118b32717dffeb0d464027a5b to your computer and use it in GitHub Desktop.
Create a table for quick testing with random data
DROP TABLE IF EXISTS dbo.test;
CREATE TABLE dbo.Test (
ID int IDENTITY(1, 1) NOT NULL PRIMARY KEY
, PayLoad nvarchar(1000) NOT NULL DEFAULT (REPLICATE(CHAR(33 + ABS(CHECKSUM(NEWID())) % 90), ABS(CHECKSUM(NEWID())) % 1000))
);
GO
SET NOCOUNT ON;
DECLARE @i int = 10000;
WHILE @i > 0
BEGIN
INSERT dbo.Test DEFAULT VALUES;
SET @i = @i - 1;
END
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment