| id | name | month |
=================== | 1 |约翰|一月| | 2 | geo | June | | 3 | roy | 6月| | 4 | bon |六月| | 5 | ron | January | | 6 | jeny | 3月
| | 7 | bily | March | | 8 | frnk | May | | 9 |乔|六月|
我需要以月结表的形式出现并在同一个月打印一个 表
1月| id | name | month | =================== | 1 |约翰|一月| | 5 | ron | January |
============================
三月
| id | name | month | =================== | 6 | jeny |三月| | 7 | bily | March |
============================
月
| id | name | month | ===================== | 8 | frnk | May | ============================六月
| id | name | month | ======================== | 2 | geo | June | | 3 | roy | 6月| | 4 | bon |六月|
===========================
答案 0 :(得分:1)
您无法在单个查询中获取多个结果。 如果您需要单个月的结果,请使用
SELECT * FROM TABLE WHERE month='january'
如果您需要在一个表中使用所有月份组,请使用
SELECT * FROM TABLE GROUP BY month