How to Display RowNumber with Select Query in SQL Server 2005

rownumber() function is used to return the rownumber with select query

The Follwoing query will return the result set row number

Синтакса
ROW_NUMBER ( ) OVER ( [ ] )

Пример
Select row_number() over(order by productid) as SlNo,productname,unitprice from products

Оставете Одговор

Можете да ги користите овие HTML таговите

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>