SQL Server:
select a1,a2,a3,a4,cast(a1 as int)+a2-a3-a4 as a5 from a
还有一种类型转化
select a1,a2,a3,a4,convert(int,a1)+a2-a3-a4 as a5 from a
如果是在delphi中呢!(如果是在Access中!)
添加一个计算字段:
在计算事件中 FieldByName(a1).asintger+FieldByName(a2).asintger-FieldByName(a3).asintger-FieldByName(a4).asintger