方式一:
delete from table where id in (select user_id from table2)
方式二:
delete a from a,(select id from XXXX where XXX) b where a.id = b.id