以下测试环境为 SQL2016
1、
select 1/0
返回错误:
消息 8134,级别 16,状态 1,第 1 行
遇到以零作除数错误。
2、
select 0/1
返回正确:
0
3、
select 1/null
null
4、
select null/1