运行脚本 SQL Server 2005 时如何抑制 T-SQL 警告? [英] How do I suppress T-SQL warnings when running a script SQL Server 2005?

查看:41
本文介绍了运行脚本 SQL Server 2005 时如何抑制 T-SQL 警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以抑制由 T-SQL 脚本生成的警告?如果是这样,如何?

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

我知道我可以使用

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.

谢谢.

推荐答案

参见 SETANSI_警告{ON |关闭}

这篇关于运行脚本 SQL Server 2005 时如何抑制 T-SQL 警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆