Hi, I am pretty new in TSQL, I try to insert some dummy data inside my table using a WHILE, but it run really really slow.
I was thinking maybe I am writing not properly the code, could yo please have a look and confirm it? thanks -- Insert dummy data
DECLARE
@i int,
@Content int;
SET @i = 5001;
WHILE @i > 5000 AND @i < 10000
BEGIN
SET @Content = ROUND(((10000-5000)*RAND()+5000),0)
INSERT INTO dbo.CmsImagesContents
(ContentId, Title, AltTag, Caption)
VALUES
(@Content,'Test Title', 'Test AltTag', 'Test Caption');
SET @i = @i + 1;
END