MySQL根据内容

时间:2017-07-04 21:43:21

标签: mysql pivot

我想知道如何使用MySQL从

转移表格
+----------+----------+-------------+------------+
| table_id | other_id | description | expression |
+----------+----------+-------------+------------+
|        1 |        1 | blah        | blah       |
|        2 |        1 | meh         | meh        |
|        3 |        1 | example     | example    |
+----------+----------+-------------+------------+`

使用other_id进行排序的表格,但没有表达式和描述仅限于指定的数字

+--------------+-------------+--------------+-------------+--------------+-------------+
| description1 | expression1 | description2 | expression2 | description3 | expression3 |
+--------------+-------------+--------------+-------------+--------------+-------------+
| blah         | blah        | meh          | meh         | example      | example     |
+--------------+-------------+--------------+-------------+--------------+-------------+`

0 个答案:

没有答案