Reputation: 35
I have
id | start | end
-------------------------------------
213 | 2014-03-20 | 2014-04-01
999 | 2014-03-20 | 2014-04-01
213 | 2012-02-10 | 2013-02-23
table is defined with a composite key (id, start, end)
I need to read all existing combinations of start & end
e.g.
res['start'] | res['end']
-------------------------
2014-03-20 | 2014-04-01
2013-02-10 | 2013-02-23
Upvotes: 0
Views: 26
Reputation: 18600
You may want this
SELECT DISTINCT `start`,`end` FROM table_name;
Upvotes: 1