Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.
There are multiple ways to transform rows into columns in SQL. One of those ways is to use PIVOT in SQL like the example below.
select col1, col2, col3
from
(
select value, columnname
from yourtable
) d
pivot
(
max(value)
for columnname in (col1, col2, col3)
) piv;
USE PIVOT
Yes it is possible by using PIVOT keyword in sql
Hi,
Please visit the following URL you can fnd the answer here . hop this will help.
http://blog.jontav.com/post//convert-rows-to-columns-columns-to-rows-in-sql-server