sql server - T-SQL: How to have an Auto-Increment variable -
i writing set of complex xml queries. lot of them hierarchical queries select x , (select y tbl2 xml) table1 xml
etc. wish way add auto increment variable add here this:
select @incr [@id], x [@title], (select @incr [@id], y [@title] tbl2 xml path('node')) table1 xml path('node')
i wish variable @incr return integer increments every time use it.
is there easy solution this?
Comments
Post a Comment