MySQL Pivot Tables Without Numbers
Clash Royale CLAN TAG#URR8PPP
MySQL Pivot Tables Without Numbers
I trying to do a pivot table from this table.
I want a table like this:
I want my headers in a column.
How can I achieve this?
Thanks a lot.
1 Answer
1
You can use union all
:
union all
select 'field1' as field, field1 from t
union all
select 'field2' as field, field2 from t
union all
select 'field3' as field, field3 from t
union all
select 'field4' as field, field4 from t;
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
show us your attempt.
– Vamsi Prabhala
Aug 6 at 1:25