SQL Server Insert Row number in Query Resultset

1
13

Select Like following

SELECT custid, custname, ROW_NUMBER() OVER(ORDER BY custid asc) AS ‘Row Number’ from members

will list row number serially

Here the recordset is first ordered according to custid and with respect to this serial number calculated and displayed with label RowNumber

 

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here