2016-03-15 113 views
0

我在Oracle中有以下查询。 如何将其转换为MySQL,因为我们在MySQL中没有rowid和rownum?将具有rowid和rownum的Oracle查询转换为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); 
+1

[MySQL中Oracle的RowID的等价物]的可能重复(http://stackoverflow.com/questions/2728413/equivalent-of-oracle-s-rowid-in-mysql) –

回答

0

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