28> CREATE TABLE newtable (a int)
29> GO
1> INSERT INTO newtable VALUES (10)
2> INSERT INTO newtable VALUES (20)
3> INSERT INTO newtable VALUES (30)
4> GO
(1 rows affected)
(1 rows affected)
(1 rows affected)
1> DECLARE @counter int
2> SET @counter = 1
3> WHILE @counter < 1000 BEGIN
4> UPDATE newtable SET a = a + 1
5> SET @counter = @counter + 1
6> END
7> GO
1>
2> drop table newtable;
3> GO
|