1、创建测试表,create table test_num(fee_id number, fee1 number, fee2 number, fee_3 number);
2、插入测试数据,
insert into test_num values(1001, 1200,1800,3000);
insert into test_num values(1002, 2200,6800,4055);
insert into test_num values(1003, 3200,7800,3790);
insert into test_num values(1004, 4200,1400,6800);
insert into test_num values(1005, 5200,1330,7800);
insert into test_num values(1006, 6200,1800,5200);
3、查询表中记录,select * from TEST_NUM t
4、编辑sql,输出多列相加的结果,select t.*, fee1+fee2+fee_3 as fee_all from TEST_NUM t
SQL Server数据中运算符与表达式