In Oracle, it\'s possible to do a SELECT statement that returns the row number as a column in your result set.
SELECT
For example,
SELECT rownu
Dave's answer is great, i'd just like to add that it's also possible to do that by placing the wildcard as the first column:
select *,rownum from table
Works, but the following won't:
select rownum,* from table
I've tested on MySQL.