How do I suppress T-SQL warnings when running a script SQL Server 2005?

♀尐吖头ヾ 提交于 2019-12-04 02:43:01

问题


Is it possible to suppress warnings generated by T-SQL scripts? If so, how?

I know I can turn of the 'records affected' messages with

SET NOCOUNT ON

but is there an equivalent for warnings? Eg:

Warning: Null value is eliminated by an aggregate or other SET operation.

If I'm expecting these errors, it helps to sift the real errors from the chaff in a big script.

Thanks.


回答1:


See SET ANSI_WARNINGS {ON | OFF}



来源:https://stackoverflow.com/questions/1280508/how-do-i-suppress-t-sql-warnings-when-running-a-script-sql-server-2005

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!