0

I have a table , and I want to get the transposition of it,how can I get it?

I have searched many information about transposition of mysql table but all I got are about change row to column which cannot meet my need. Can you help me? Thanks very much!

Original Table

enter image description here

Transposed Table

enter image description here

Shubham Srivastava
  • 1,807
  • 1
  • 10
  • 17
Reasno
  • 21
  • 3
  • Does this answer your question? [SQL - How to transpose?](https://stackoverflow.com/questions/3392956/sql-how-to-transpose) – Shubham Srivastava Sep 11 '20 at 04:02
  • can you give this a try - https://stackoverflow.com/questions/19019453/mysql-transpose-row-into-column-and-column-into-row – Koushik Roy Sep 11 '20 at 04:03
  • Thanks for your help! But I want to turn the column name to the first column of the new table, which is not addressed in your link. For example, i want to change the column name F1,F2,F3 of the original table into the first column of the transposed table. – Reasno Sep 11 '20 at 04:24
  • Please post code, errors, sample data or textual output here as plain-text, not as images that can be hard to read, can’t be copy-pasted to help test code or use in answers, and are barrier to those who depend on screen readers. You can edit your question to add the code in the body of your question. For easy formatting use the `{}` button to mark blocks of code, or indent with four spaces for the same effect. The contents of a **screenshot can’t be searched, run as code, or copied and edited to create a solution.** – tadman Sep 11 '20 at 04:26
  • 1
    Thankes for @Koushik Roy 's comments. The https://stackoverflow.com/questions/19019453/mysql-transpose-row-into-column-and-column-into-row – Reasno Sep 11 '20 at 04:29
  • Most welcome :) – Koushik Roy Sep 11 '20 at 04:42

0 Answers0