Postgres has row numbers:<p><pre><code>  select *, row_number() over (order by id desc) as rownum
  from stuff;
</code></pre>
Window functions are really convenient. I&#x27;m not familiar enough with Oracle to say what the practical differences are, though.