mysql子查询exists

SELECT * FROM t_order a  where a.user_id=5 and exists(SELECT * from t_relation b where b.userID =a.user_id) 

你可能感兴趣的:(mysql子查询exists)