Count columns SQL Server
If I have a table
`fnavn - lname - ... - countColumn
And for each SELECT
I use on this table, I want countColumn
to 开发者_开发百科go up by one.
Is it possible?
Check out ROW_NUMBER(), e.g.
select *, row_number() over(order by fnavn) as [count]
from MyTable
精彩评论