tags:

views:

104

answers:

2

I am running a query in SQL, and I need to select a minimum date that is not 0000-00-00. Is there any way to exclude this value and choose the next minimum date?

+4  A: 
SELECT  MIN(mydate)
FROM    mytable
WHERE   mydate > '0000-00-00'
Quassnoi
A: 

select min(date) from tbl where date > '0000-00-00'

oraz
Thanks, that was simpler than I expected.
nsw1475