日期:2014-05-18  浏览次数:20370 次

根据check约束条件自动插入数据?
现有表M
拥有ABC三个字段
给C加check约束
让C的值=A/B
当AB插入数据时
c自动插入

例如:
A B C
6 3 2

完全忘记了如何自动插入。。。。

谢谢

------解决方案--------------------
随手敲的,难免手误
SQL code
create table tb(a int,b int,c as a/b)

------解决方案--------------------
樓上正解
------解决方案--------------------
create table tb(a int,b int,c as a/b)


---------
同意