發表文章

目前顯示的是 4月 26, 2019的文章

SQL ORACLE converting columns into rows

圖片
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box; } 0 I have the result with the columns Indice,valeur1 etc: Indice value1 value2 value3 value4 1 x maths physics chemistry 2 21/01/18 133 184 115 I would like to display the result in a vertical manner like Indice,1,2 valeur1, x,21/01/2018 valeur2,maths, 133 valeur3,physics,184 valeur4,chemistry ,115 ... ... ... ... My query: select 'x' as Valeur1, 'maths' as Valeur2, 'physics' as Valeur3, 'Chemistry' as Valeur4, null as Valeur5, null as Valeur6, null as Valeur7, null as Valeur8, null as Valeur9, ...