Posted on
2019-12-16 11:16CDUT阳阳
阅读(75)
评论(0)
收藏举报
1 delete与in搭配使用,效率特别低,如下可解决该问题,not in同理
/*正常写法*/
DELETE from activity where id in ( SELECT id from activity_data);
/*优化后写法*/
DELETE from activity where id in (select * from (SELECT id from activity_data) t);