求大神帮忙看下 not exists 和 order by 结合无法排序
select stuId,stuName from student studentwherecampusId=1 andstuAdvisor=108 and not exists(select stuId from stu_class stu_Class where classId=515 and student.stuId=stu_Class.stuId)order by stuNamelimit 0,10 not exists 和order by 结合,查询结果没有按照 stuName排序,请大神指教下,拜谢 你的 order by 后面没有加排序的类型:asc或者desc参考自:
MySQL如何优化ORDER BY http://www.data.5helpyou.com/article246.html 首先是升序的,sql语句是没有问题的,你可以先在数据库里面查询
页:
[1]