How to stop SQLServer writing extraneous stuff eg

2019-04-03 01:42发布

问题:

Is there a command I can run inside my SQL script so that it stops outputing information about each operation that gets run?

ie I don't want to see this:

(1 row(s) affected)

(1 row(s) affected)

(1 row(s) affected)

回答1:

Use:

SET NOCOUNT ON

to suppress these messages and use the command below to enable the messages.

SET NOCOUNT OFF


回答2:

run this command:

set nocount on