<select id="doGetList" resultMap="studyRecordMap">
select * from study_record
order by create_date desc limit ${start},${pageSize}
</select>
SELECT
deviceId, reportStatus, reportDateTime
FROM
doorSensorDevice
WHERE
deviceId = ${deviceId}
AND reportStatus IS NOT NULL
ORDER BY reportDateTime DESC
LIMIT 0 , 20;
本文深入探讨了SQL查询语句的高效使用技巧,包括如何利用LIMIT进行结果集限制,以及如何通过ORDER BY对数据进行排序。同时,文章还介绍了如何在WHERE子句中正确处理NULL值,确保查询结果的准确性。
1026

被折叠的 条评论
为什么被折叠?



