I have a table with 5 columns, 2 columns of them are "datetime" field (starttime and endtime).
example:
id starttime endtime
-------------------------------------------------------------------
1 2006-02-24 01:00:00 2006-02-24 02:00:00
2 2006-02-24 03:00:00 2006-02-24 04:00:00
3 2006-02-24 05:00:00 2006-02-24 06:00:00
4 2006-02-24 07:00:00 2006-02-24 08:00:00
I want to the output all data sorting by the time of both starttime and endtime.
time
-------------------------------
2006-02-24 01:00:00
2006-02-24 02:00:00
2006-02-24 03:00:00
2006-02-24 04:00:00
2006-02-24 05:00:00
2006-02-24 06:00:00
2006-02-24 07:00:00
2006-02-24 08:00:00
How to write the query??
Thank you