SQL Select a row and store in a SQL variable

后端 未结 3 1604
伪装坚强ぢ
伪装坚强ぢ 2021-02-05 06:16

So, I\'m writing this Stored Proc and I really suck at SQL.

My Question to you guys is:

Can I select an entire row and store it in a variable?

I k

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-05 06:30

    Please see/via:

    MSSQL Select statement with incremental integer column... not from a table

    SELECT ROW_NUMBER() OVER( ORDER BY Column1, Column2 ) AS 'rownumber',*
    FROM YourTable
    

提交回复
热议问题