MySql 在LIMIT、DISTINCT关键字出现的数据遗漏
MySql 在LIMIT、DISTINCT关键字出现的数据遗漏
select DISTINCT b.due_bill_no from asset_receipt_detail b where b.project_no = ? and b.batch_date = ? limit ?,?
执行的结果,如果有多条分在不同的页码上,会出现数据遗漏,需要包装,如下
select * from (select DISTINCT b.due_bill_no from asset_receipt_detail b whe
原创
2021-03-25 10:25:25 ·
568 阅读 ·
0 评论