I have table like this:
PC(code, model, speed, ram, hd, cd, price)
when i run the query :
select model,speed,ram,hd,cd,price from PC where code=(select max(code) from PC)
i get the result as below:
model speed ram hd cd price
1233 800 128 20.0 50x 970.0000
But i need the result using unpivot
:
chr value
cd 50x
hd 20
model 1233
price 970.00
ram 128
speed 800
I am using sql server 2014.