0

I have the below query in Oracle . How can I convert this to MySQL as we don't have rowid and rownum in 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 );
Frank Schmitt
  • 30,195
  • 12
  • 73
  • 107
user3160866
  • 367
  • 2
  • 9
  • 1
    Possible duplicate of [Equivalent of Oracle’s RowID in MySQL](http://stackoverflow.com/questions/2728413/equivalent-of-oracle-s-rowid-in-mysql) – Sameer Mirji Mar 15 '16 at 08:27

1 Answers1

0

Use limit 7 instead of rownum <=7. And I don't think you need rowid here do you?

St3an
  • 726
  • 1
  • 6
  • 21