MySQL Pivot Tables Without Numbers

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



MySQL Pivot Tables Without Numbers



I trying to do a pivot table from this table.
enter image description here



I want a table like this:



enter image description here



I want my headers in a column.



How can I achieve this?



Thanks a lot.





show us your attempt.
– Vamsi Prabhala
Aug 6 at 1:25




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.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS