Closed arcaphalia closed 6 years ago
当sql语句比较复杂时,select count(0)会把order by 包进去,导致报错 除非另外还指定了 TOP、OFFSET 或 FOR XML,否则,ORDER BY 子句在视图、内联函数、派生表、子查询和公用表表达式中无效。比如用select name = case when id=1 uu....
复杂SQL没法自动去排序,用5.0.4能自动调手写的count查询。 详细看:https://github.com/pagehelper/Mybatis-PageHelper/blob/master/wikis/zh/Changelog.md
当sql语句比较复杂时,select count(0)会把order by 包进去,导致报错 除非另外还指定了 TOP、OFFSET 或 FOR XML,否则,ORDER BY 子句在视图、内联函数、派生表、子查询和公用表表达式中无效。比如用select name = case when id=1 uu....