how to select columns as rows?

后端 未结 5 1390
走了就别回头了
走了就别回头了 2020-12-06 17:53

So, I\'ve been searching around and I\'ve found things similar to my problem, but I need more help to get a real solution.

I\'m trying to construct a query that will

5条回答
  •  不知归路
    2020-12-06 18:06

    You could always do something like this

    SELECT 'Column_Name' AS ColumnName, 
      (SELECT TOP 1 Column_Name FROM Table tbl2 WHERE tbl.ID = tbl2.ID)
    FROM Table tbl
    

提交回复
热议问题