How to convert rows into columns in SQL Server & explain with an example?(Interview Question) | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 2

How to convert rows into columns in SQL Server & explain with an example?(Interview Question)

15th May 2019, 1:57 AM
$@G@®️
$@G@®️ - avatar
3 Réponses
+ 2
Yes
15th May 2019, 11:30 PM
$@G@®️
$@G@®️ - avatar
+ 2
You can convert rows in to Columns in SQL Server by using "PIVOT Operator"
15th May 2019, 11:33 PM
$@G@®️
$@G@®️ - avatar
0
I'm not an expert but I'm also not sure why you would want to do this - do you mean turning each row of a table into a column instead, like this? Header: animal | name | age Row 1: cat | kit | 3 into: Header: cat Row 1: kit row 2: 3
15th May 2019, 6:59 AM
Rincewind
Rincewind - avatar