Row_Number () is used to create a sort column in the record list that results from a sql query. In short, the rotating list is a function that creates line numbers for sorting. We can also group these line numbers by any field. This function comes with SQL 2005.