MySQL中exists子查询

概念 查询返回的结果就只有0或者1,1表明成立,0表明不成立web 语法 where exists(查询结果); where 1 : 永远为真svg 案例 求出有学生在的全部班级 select * from my_class as c where exists(select stu_id from my_student as s where c.class_id = s.class_id);
相关文章
相关标签/搜索