it's just a test data we are inserting to test table to check from from end. we are inserting the same data only with name name lastname address age with these columns as id has identity value
T That means - what you need is LooP(while loop like what patrick showed above). cursors are nothing but loops. they both are bad and really not needed in this case. but since you insist, you can use the below solution., just replace the table #test with your real table .. it will insert into your real table from last the row(5000)..
declare @A int
set @a=1
WHILE (@a<=100000)
BEGIN
INSERT INTO #test (name, lastName, address, age, dob, sex)
VALUES ('Sam', 'Sammy', '12 Atlantic Street', 52, '1967-7-15', 1)
set @a=@a+1
END
Hope it Helps!!
No comments:
Post a Comment