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

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -