标题: 求大神帮忙看下 not exists 和 order by 结合无法排序 [打印本页] 作者: 29584697 时间: 2016-7-6 18:19 标题: 求大神帮忙看下 not exists 和 order by 结合无法排序
select stuId,stuName from student student where campusId=1 and stuAdvisor=108 and not exists (select stuId from stu_class stu_Class where classId=515 and student.stuId=stu_Class.stuId) order by stuName limit 0,10
复制代码
not exists 和order by 结合,查询结果没有按照 stuName排序,请大神指教下,拜谢作者: yflower 时间: 2016-8-3 17:57
你的 order by 后面没有加排序的类型:asc或者desc