select
*
from mission
where user_id_belonged = '1' and status=0
limit 0,10
order by id ASC
*
from mission
where user_id_belonged = '1' and status=0
limit 0,10
order by id ASC
以上sql语句运行会报sql错误
order by 要放在limit前边,以下sql是正确的
select
*
from mission
where user_id_belonged = '1' and status=0
order by id ASC
limit 0,10
本文介绍了一个常见的SQL语句错误——ORDER BY子句放置位置不当导致的问题,并给出了正确的SQL语句编写方式。
4202

被折叠的 条评论
为什么被折叠?



