Select by columns position

Marco Dell'Oca 201 Reputation points
2022-06-16T17:13:32.07+00:00

After running a pivot function, I am unable to select the column by names because I don't know them.
Can I, in a select on the pivot function, select the columns with the position and not with the name of a column?
for example:
select fourth column, fifth column, sixth column from pivotfunction where ...
Is there any way to do this?
Thanks for any help
Marco Dell'Oca

Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,675 questions
0 comments No comments
{count} votes

Accepted answer
  1. Naomi Nosonovsky 8,051 Reputation points
    2022-06-16T17:19:25.247+00:00

    Not in T-SQL. Unfortunately, there is no way.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Marco Dell'Oca 201 Reputation points
    2022-06-17T07:49:48.547+00:00

    thank you very much

    Marco Dell'Oca

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.