sql杂记

在删除一张表的时候需要关联另外一张表作为查询条件的时候如果有两个字段,则用sql的EXISTS

例:DELETE from recharge_r where EXISTS(SELECT serid from userids b where recharge_r.serid = b.serid and recharge_r.userid = b.userid)

原文地址:https://www.cnblogs.com/lingqingyu/p/11481322.html