Hi,
Well to my knowledge, all
DB engines or most of the popular ones do have intrinsic ROWID and ROWNUM, with little difference in some places between different engines.
ROWNUM is what you are looking for, you didn't mention what
DB SQL engine in question so... ROWNUM is most likely what you are looking for.
for extra information
Oracle :
https://stackoverflow.com/questions/...owid-vs-rownum
SQLite :
https://superuser.com/questions/1643...a-sqlite-query
MySQL :
https://dev.mysql.com/doc/refman/8.0...ion_row-number there is another approach than the mentioned like "SELECT @rowid:=@rowid+1 as rowid FROM MY_TABLE, (SELECT @rowid:=0) as init"
MariaDB:
https://mariadb.com/kb/en/rownum/
PgSQL :
https://www.postgresql.org/docs/8.4/...ns-window.html