¿Cómo encontrar el índice de una fila en el servidor SQL?

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?

preguntado el 09 de enero de 11 a las 07:01

He's asking about PIVOT but doesn't know it yet. -

2 Respuestas

sp_helpindex:

Reports information about the indexes on a table or view.

Respondido el 09 de enero de 11 a las 10:01

Respondido el 24 de enero de 13 a las 23:01

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.