In MariaDB, ROWNUM()
is a built-in function that returns the current number of accepted rows in the current context. Its main purpose is to emulate the ROWNUM
 pseudo column in Oracle.Â
ROWNUM()
can be used in a way that has a similar effect to the LIMIT
clause – to limit the number of results returned by a query.
When in Oracle mode, it can be called as ROWNUM
(i.e. without the parentheses).
The ROWNUM()
 function is supported from MariaDB 10.6.1.