基本格式:
DELETE t1 FROM t1,t2 WHERE
t1.id=
t2.id 或 DELETE FROM t1 USING t1,t2 WHERE
t1.id=
t2.id




示例應用:
DELETE coupon FROM coupon,member WHERE coupon.mem_no=member.reg_no AND coupon.`status`=0 AND coupon.`batch_no`='yaoqingpengyou001' AND member.`mobile` IN (
182xxxx9886
)
//關聯用戶表,根據手機號碼查詢該會員號對應的券(批次號為yaoqingpengyou001且未使用status=0)刪除。
DELETE FROM coupon USING coupon,member WHERE coupon.mem_no=member.reg_no AND coupon.`status`=0 AND coupon.`batch_no`='yaoqingpengyou001' AND member.`mobile` IN (
182xxxx9886
)
182xxxx9886
)