请问该如何将ORACLE rownum rn语句转换为Mysql limit语句?

SELECT
LONGITUDE,
OBLIGATE
FROM
(
SELECT
A.*, ROWNUM RN
FROM
(
SELECT
*
FROM
VSOS3
WHERE
DATE_TIME >= '"+endTime+" 00:00:00'
AND DATE_TIME <= '"+startTime+" 23:59:59'
AND SITE_NUM = '"+site+"'
ORDER BY
DATE_TIME DESC
) A
WHERE
ROWNUM <= "+(start + limit)+"
)
WHERE
RN >= "+ (start)+"
谁帮我把这句话修改为mysql的limit格式 感激不尽。

慕莱坞森
浏览 346回答 1
1回答

斯蒂芬大帝

SELECTLONGITUDE,OBLIGATEFROMVSOS3WHEREDATE_TIME&nbsp;>=&nbsp;'"+endTime+"&nbsp;00:00:00'AND&nbsp;DATE_TIME&nbsp;<=&nbsp;'"+startTime+"&nbsp;23:59:59'AND&nbsp;SITE_NUM&nbsp;=&nbsp;'"+site+"'ORDER&nbsp;BYDATE_TIME&nbsp;DESCLIMIT&nbsp;"+&nbsp;start&nbsp;+"&nbsp;,&nbsp;"+&nbsp;limit&nbsp;+"
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

MySQL
Oracle