desc降序排列

对sql不熟,以为desc这个条件要放到最后,但是在分页的情况下,要放到limit之前

在这里插入图片描述
报错

 Cause: java.sql.SQLSyntaxErrorException: Table 'oo' from one of the SELECTs cannot be used in field list
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Table 'oo' from one of the SELECTs cannot be used in field list

可能是因为按id降序不需要oo.id表示,直接用id就可以

猜你喜欢

转载自blog.csdn.net/weixin_42260782/article/details/112567065