Answers

Question and Answer:

  Home  MS SQL Server

⟩ How To Create a Large Table with Random Data for Index Testing in MS SQL Server?

If you want to see how index can be used to improve data search performance, you have to build some large tables, which requires large amount of random data. This tutorial exercise helps you to build a large table with pure random data:

USE GlobalGuideLineDatabase;

GO

-- Drop the old table, if needed

DROP TABLE ggl_random;

GO

-- Create a table with primary key

CREATE TABLE ggl_random (

id INT,

rand_integer INT,

rand_number numeric(18,9),

rand_datetime DATETIME,

rand_string VARCHAR(80)

);

GO

 123 views

More Questions for you: