标签:log not where from style class weight 使用 mys
#IN -> EXISTS SELECT * FROM CouponItem AS A WHERE A.CouponId IN(SELECT B.Id FROM Coupon AS B WHERE B.Id<30); SELECT * FROM CouponItem AS A WHERE EXISTS(SELECT B.Id FROM Coupon AS B WHERE B.Id<30 AND A.CouponId=B.Id); #NOT IN -> NOT EXISTS SELECT * FROM CouponItem AS A WHERE A.CouponId NOT IN(SELECT B.Id FROM Coupon AS B WHERE B.Id<30); SELECT * FROM CouponItem AS A WHERE NOT EXISTS(SELECT B.Id FROM Coupon AS B WHERE B.Id<30 AND A.CouponId=B.Id);
标签:log not where from style class weight 使用 mys
原文地址:http://www.cnblogs.com/xiaowangzhi/p/7737254.html