Mybatis中limit用法与分页查询


SELECT 
    deviceId, reportStatus, reportDateTime
FROM
    doorSensorDevice
WHERE
    deviceId = ${deviceId}
        AND reportStatus IS NOT NULL
ORDER BY reportDateTime DESC
LIMIT 0 , 20;

 

你可能感兴趣的:(Mybatis)