I have a mysql tableA, it changes it's fieldname every minute,i need it's fieldname, so i do like this:
select COLUMN_NAME from information_schema.COLUMNS where table_name = 'tableA';
output:
+-------------+
| COLUMN_NAME |
+-------------+
| min |
| unkonwn1 |
| unkonwn2 |
| unkonwn3 |
| unkonwn4 |
| unkonwn5 |
| average |
+-------------+
but i need select output like this:
+-------+----------+----------+---------+------------+---------+---------+
| min | unkonwn1 | unkonwn2 | unkonwn3| unkonwn4 | unkonwn5| average |
+-------+----------+----------+---------+------------+---------+---------+
how to get this kind of result ?