Syntax of for-loop in SQL Server

前端 未结 9 1136
慢半拍i
慢半拍i 2020-11-28 02:36

What is the syntax of a for loop in TSQL?

9条回答
  •  难免孤独
    2020-11-28 03:15

    How about this:

    BEGIN
       Do Something
    END
    GO 10
    

    ... of course you could put an incremental counter inside it if you need to count.

提交回复
热议问题