解决数据库排序后使用分页数据不匹配
原因:在排序字段有数据重复的情况下,会很容易出现排序结果与预期不一致的问题
错误列子
SELECT
t1.gcmc,
t2."name" AS distname,
( SELECT NAME FROM xj_company c WHERE c.uuid = t1.company_id ) company
FROM
xj_proj t1
LEFT JOIN xj_code_dist t2 ON t1.dist_id = t2.uuid
LEFT JOIN xj_company c ON c.
原创
2021-03-17 11:00:54 ·
493 阅读 ·
0 评论