在计算列上只允许使用 UNIQUE 或 PRIMARY KEY 约束,但计算列允许为空--examplecreate table t1 ( a int ,b int, c as a+b )
goinsert t1 select null,nullinsert t1 select 1,2select * from t1
---
a b c
null null null
1 2 3
goinsert t1 select null,nullinsert t1 select 1,2select * from t1
---
a b c
null null null
1 2 3
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货