set ansi_nulls on : 遵循sql 92 标准,在对空值进行等于 (=) 或不等于 (<>) 比较时取值为 FALSE。当执行where = null 或where .. <> NULL 时都返回零行。 set ansi_nulls off 反之。
set quoted_indentifier on: 标识符用双引号,文字用单引号标志。 当设置为 off 时,标识符不可加引号!
set nocount off 返回@@rowcount 的值, 设置为on 对该值不产生影响,
如:
set nocount on select * into #test from calendar -- print @@rowcount drop table #test 输出:Command(s) completed successfully. set nocount off select * into #test from calendar -- print @@rowcount drop table #test 输出: 79 row(s) affected)
.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23155850/viewspace-631449/ ,如需转载,请注明出处,否则将追究法律责任。