oracle rownum is only wording, rownum may be used to fetch the first data in the oracle, or write data defining a bulk quantity of batch writing the like
writing the first data fetch mysql
SELECT * FROM t order by id LIMIT 1;
taking first data written oracle
SELECT * FROM t where rownum =1 order by id;
ok, the above is taken mysql and oracle Comparative writing the first data, but this is just one use of rownum, rownum write data can also be used for batch
T table to write a batch million data:
insert into t(id,date) select sys_guid(),sysdate from dual connect by rownum<=10000;
oracle original wording:
select * from (select id,name from t) where rownum <![CDATA[<=]]> to_number(num);
After rewriting mysql SQL:
SELECT
*
FROM
(SELECT
tb.*,
@rownum := @rownum + 1 AS rownum
FROM
(SELECT
id,
NAME
FROM
t) tb,
(SELECT
@rownum := 0) r) AS t
WHERE rownum <= CAST(num AS SIGNED INTEGER) ;