Hãy thử truy vấn bên dưới; -
select * from
(select cars, item,value from carTable)
pivot(max(value) for item in ('wheels', 'color', 'price'))
Hãy thử truy vấn bên dưới; -
select * from
(select cars, item,value from carTable)
pivot(max(value) for item in ('wheels', 'color', 'price'))