Tuesday, March 15, 2011

How to use While loop in Sql Query Analyser

declare @i as int
set @i=1
BEGIN
while @i < 10

UPDATE employee_details set lastname='Kumar' where serial_num=@i
set @i=@i+1

END;

0 comments:

Post a Comment