-- 方法一:定义计算列表达式
Create table #(a as (b*1.5), b int)insert into # select 2select * from #
--结果 a b
--------------- -----------
3.0 2(1 row(s) affected)
Create table #(a as (b*1.5), b int)insert into # select 2select * from #
--结果 a b
--------------- -----------
3.0 2(1 row(s) affected)
在默认值中填入B字段*1.5.
他会自动计算的.