2014-07-21 22 views
0

组合我有检索的复合键

id | start  | end 
------------------------------------- 
213 | 2014-03-20 | 2014-04-01 
999 | 2014-03-20 | 2014-04-01 
213 | 2012-02-10 | 2013-02-23 

表与所定义的复合关键字(id, start, end)

我需要阅读开始&端

例如所有现有的组合

res['start'] | res['end'] 
------------------------- 
2014-03-20 | 2014-04-01 
2013-02-10 | 2013-02-23 

回答

1

你可能想这

SELECT DISTINCT `start`,`end` FROM table_name;