您的位置:首页 > 其它

复制表结构数据

2009-08-25 17:15 106 查看
insert into dsms_wage_detail(
staff_id,
wage_year,
regularized_wage,
contract_wage,
seniority_wage,
benefits_wage,
computer_grants,
evection_grants,
social_security_wages,
personal_withholding,
withholding_tax,
corporate_card,
other_deductions,
other_wage,
withholding_tax2,
personal_card,
notes)
(SELECT
d.staff_id,
DATE_FORMAT(DATE_SUB(CURRENT_DATE,INTERVAL 1 MONTH),"%Y-%m") as wage_year,
d.regularized_wage,
d.contract_wage,
d.seniority_wage,
d.benefits_wage,
d.computer_grants,
d.evection_grants,
d.social_security_wages,
d.personal_withholding,
d.withholding_tax,
d.corporate_card,
d.other_deductions,
d.other_wage,
d.withholding_tax2,
d.personal_card,
d.notes

from dsms_wage_detail d
where
wage_year=DATE_FORMAT(DATE_SUB(CURRENT_DATE,INTERVAL 1 MONTH),"%Y-%m")
)

select * from dsms_wage_detail
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: