标签:des style blog color ar div log ad
daily price中应该有联合主键,这样插入就不会重复了,不过不要紧。
组合主键
alter table tb_ul_daily add PRIMARY KEY(ul_id,trading_date)
删除重复记录
delete from tb_ul_daily where id in (select id from (select max(id) as id,count(trading_date) as count from tb_ul_daily group by trading_date having count >1 order by count desc) as tab )
标签:des style blog color ar div log ad
原文地址:http://www.cnblogs.com/surgod/p/3903701.html