日期:2014-05-16  浏览次数:20438 次

实现两表之间数据对拷

sql原理:

INSERT INTO <表名>(列名)
SELECT <列名>
FROM <源表名> 

insert into dhs_medichesysdata(
??? id,
??? dataName,
??? proportion,
??? dataUnit,
??? edittime,
??? editer,
??? ctivestataus,
??? remark,
??? checker,
??? checktime,
??? checkermark,
??? checkresult
??? )
?? select
??????? `f_humansystemid`,
??????? `f_hsname`,
??????? `f_hsweight`,
??????? `f_hsweightunit`,
??????? `f_hseditdt`,
??????? `f_hsediter`,
??????? `f_hsactive`,
??????? `f_hsremark`,
??????? `f_checker`,
??????? `f_checkdt`,
??????? `f_checkremark`,
??????? `f_flag`
??? from
??????? `wnkdhs`.`a_humansystem`