SET NOCOUNT ON usage

前端 未结 17 1917
抹茶落季
抹茶落季 2020-11-22 05:55

Inspired by this question where there are differing views on SET NOCOUNT...

Should we use SET NOCOUNT ON for SQL Server? If not, why not?

17条回答
  •  余生分开走
    2020-11-22 06:14

    I know it's pretty old question. but just for update.

    Best way to use "SET NOCOUNT ON" is to put it up as a first statement in your SP and setting it OFF again just before the last SELECT statement.

提交回复
热议问题