读书人

mysql临时表技艺

发布时间: 2012-08-26 16:48:05 作者: rapoo

mysql临时表技巧

给定一个drop table if EXISTS `tmp`;create table tmp as select min(id) as id,uid from user GROUP by uid HAVING count(uid)>1;delete from user where id not in (select id from tmp) and uid in(select uid from tmp); drop table tmp;commit;?

?

读书人网 >Mysql

热点推荐