In an Oracle database, what is the difference between ROWNUM and ROW_NUMBER?

后端 未结 5 1583
南方客
南方客 2020-12-24 07:11

What is the difference between ROWNUM and ROW_NUMBER ?

5条回答
  •  清歌不尽
    2020-12-24 07:44

    rownum is a pseudocolumn which can be added to any select query, to number the rows returned (starting with 1). They are ordered according to when they were identified as being part of the final result set. (#ref)

    row_number is an analytic's function, which can be used to number the rows returned by the query in an order mandated by the row_number() function.

提交回复
热议问题