场景1:主键在清空表之后不会回到1开始
ALTER TABLE T_GPS_UPLOAD ALTER COLUMN ID RESTART WITH 1
场景2:清空表中的所有内容,
TRUNCATE TABLE T_GPS_UPLOAD IMMEDIATE;
场景3:查询分页
select * from (
select a.* , rownumber() over(order by id ) as rowid from (" +
select * from T_VERSION where VERSION_NO " +
like '%' || #{versionNo} ||'%' AND VERSION_TYPE like '%' || #{versionType} ||'%')" +
a) tmp where tmp.rowid <= #{pageOneParam} and tmp.rowid > #{pageTwoParam}