Hi, all I have a table which has a column with "time". It's format is like "0000-00-00 00:00:00" (default value). I want to get the minimum and maximum values for this cloumn. Obviously, "0000-00-00 00:00:00" isn't the minimum value I want.
What I did for the "minimum" time, suppose the column name is "ctime", the table name is "tbl_a": select ctime form tbl_a where ctime<>"0000-00-00 00:00:00" order by ctime limit 1; Using this query, I am able to get the "minimum" time value. But what is the query for "max" time value? I guess it's something about reverseing the "order by", but I couldn't find it. Could anyone please give me a hand? Thanks a lot. Xiaobo -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]