chen138 发表于 2009-11-28 00:22:33

mysql计算列

mysql数据表有:固定工作、奖金、额外金、扣除、应发工资等字段。怎么在表格实现:应发工资=固定工资+奖金+额外金-扣除
mysql table pwages(id char(4),name char(8),Fixed_wage decimal(8,2),bonus decimal(8,2),Other_add decimal(8,2),Other_cut decimal(8,2),total_wages decimal(8,2));
total_wages=Fixed_wage + bonus + Other_add - Other_cut怎么在表添加?

kider 发表于 2009-12-22 15:12:57

添加什么?

可以考虑用视图试试
页: [1]
查看完整版本: mysql计算列