MySQL的;列出不同的类别

时间:2017-05-13 06:47:56

标签: mysql sql categories

假设我的下表名为test

enter image description here

我需要SELECT才能获得以下内容:

enter image description here

有人知道如何用SQL做到这一点吗?

1 个答案:

答案 0 :(得分:0)

您可以使用boo = true;

UNION ALL

Demo