Code :
CREATE TABLE t1 ( id numeric(18, 0) identity(1,1) NOT NULL, [value] varchar(50) NOT NULL, constraint pk_t1 PRIMARY KEY clustered ( id ASC ) WITH (pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = ON, allow_page_locks = ON) ON [PRIMARY] ) ON [PRIMARY] go CREATE TABLE t2 ( id numeric(18, 0) identity(1,1) NOT NULL, [value] varchar(50) NOT NULL, constraint pk_t2 PRIMARY KEY clustered ( id ASC ) WITH (pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = ON, allow_page_locks = ON) ON [PRIMARY] ) ON [PRIMARY] go CREATE TABLE t3 ( id numeric(18, 0) identity(1,1) NOT NULL, [value] varchar(50) NOT NULL, constraint pk_t3 PRIMARY KEY clustered ( id ASC ) WITH (pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = ON, allow_page_locks = ON) ON [PRIMARY] ) ON [PRIMARY] go declare @i AS integer; SET @i = 1; while @i <= 10000 begin INSERT INTO t1 ([value]) VALUES (cast(@i AS varchar(50))); INSERT INTO t2 ([value]) VALUES (cast(@i AS varchar(50))); INSERT INTO t3 ([value]) VALUES (cast(@i AS varchar(50))); SELECT @i = @i + 1; end; go
|