I have to add, 1000 records in a given table. It contains the field Name
.
I have the Script, which does the bulk insertion. However, the primary key of this table is uniqueidentifier
( Guid()
) how I can do this using this approach.
Here is the script for creating with primary key int
declare @id int
select @id = 1
while @id >=1 and @id <= 1000
begin
insert into client values(@id, 'jack' + convert(varchar(5), @id), 12)
select @id = @id + 1
end