Unpivot with column name

前端 未结 4 2124
忘掉有多难
忘掉有多难 2020-11-22 06:10

I have a table StudentMarks with columns Name, Maths, Science, English. Data is like

Name,  Maths, Science, English  
Tilak, 90         


        
4条回答
  •  感情败类
    2020-11-22 06:42

    SELECT * FROM student

    UNPIVOT(Marks FOR subjects in(Maths , Science , English));

提交回复
热议问题