测试tsql代码:
drop table #t create table #t(id int) insert into #t(id) values(''),(' '),(' ') select * from #t
运行结果:
但是C#空字符串转换为数字会报错 “输入字符串的格式不正确。”