gpt4 book ai didi

mysql - 将具有 rowid 和 rownum 的 Oracle 查询转换为 MySQL 查询

转载 作者:行者123 更新时间:2023-11-29 21:15:10 24 4
gpt4 key购买 nike

我在 Oracle 中有以下查询。 由于 MySQL 中没有 rowid 和 rownum,如何将其转换为 MySQL?

update test_dalpu 
set data_present ='true'
where rowid
in (select rowid from
(select rowid
from test_dalpu
where EXP_TIME < current_date ORDER BY PRIORITY)
where rownum <= 7 );

最佳答案

使用limit 7而不是rownum <=7 。我认为你不需要 rowid你在这儿吗?

关于mysql - 将具有 rowid 和 rownum 的 Oracle 查询转换为 MySQL 查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36005849/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com