表table1有一个varchar类型的字段,名为cnts,一般我都用:
update table1 set cnts='新内容' where id=99 来更新。
今天大意忘记加单引号,可巧内容是数字,即变成了:
update table1 set cnts=804 where id=99 ,仍然成功,再试验
update table1 set cnts=804+5 where id=99 也能成功,很疑惑,
难道是数字时sql server 自动计算并转换吗?