A字段 B字段 C字段 D字段
001 0001 1 00001
002 0001 2 00001
这个时候 这两条记录只取一条
select * from tablename e where e.rowid in
(select min(x.rowid) from tablename x where x.D字段 = e.D字段)
用min或者max会遍历
A字段 B字段 C字段 D字段
001 0001 1 00001
002 0001 2 00001
这个时候 这两条记录只取一条
select * from tablename e where e.rowid in
(select min(x.rowid) from tablename x where x.D字段 = e.D字段)
用min或者max会遍历