标签:
create table tmp as select id as col1 from `temp_price` WHERE id = 52 group by id,marketid,date_format(date,‘%Y%m%d‘); delete from where temp_price id = 52 and id not in (select col1 from tmp); drop table tmp;
该方法主要建立一个临时表存储select信息。这样就避免了delete 和select的异常错误。
标签:
原文地址:http://my.oschina.net/u/1384818/blog/498936