How to use the PRINT statement to track execution as stored procedure is running?

前端 未结 3 762
鱼传尺愫
鱼传尺愫 2020-12-30 01:49

Reference: SQL Server

I have a stored procedure with a while loop in it and I want some messages to be printed after every 500 loops.

So, I\'ve

3条回答
  •  一生所求
    2020-12-30 02:42

    I'm sure you can use RAISERROR ... WITH NOWAIT

    If you use severity 10 it's not an error. This also provides some handy formatting eg %s, %i and you can use state too to track where you are.

提交回复
热议问题