Is there a way to suppress “x rows affected” in SQLCMD from the command line?

前端 未结 3 479
醉酒成梦
醉酒成梦 2020-12-05 12:48

Is there a way to suppress \"x rows affected\" in SQLCMD from the command line?

I\'m running an MSBuild script and don\'t want it clogging up my log on my build se

3条回答
  •  爱一瞬间的悲伤
    2020-12-05 13:19

    The -i and -q options are mutually exclusive.

    Create a file named setnocount.sql with the content:

    SET NOCOUNT ON;
    

    And you might be able to do -i setnocount.sql,otherscript.sql using the multiple files feature and effectively an "included" common first file.

提交回复
热议问题