开发者

how to find index of a row in sql server?

How can i fetch column names from a table on index basis, like I want to make a tables whose column name should be the name of last column fields of a result set of a query, but those result sets last columns value may be different at different execution time, so i want to know how can i fetch those index value of that last column to make a temp table with column name开发者_运维知识库 of those last columns value of a result set. Is there any way/function in sql server to dynamically form that?


sp_helpindex:

Reports information about the indexes on a table or view.


You can also use ROW_NUMBER as explained here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜