create table student(birthday varchar(30));
insert into student values('-1');
insert into student values('2013-01-01');--报错 select * from student where isdate(birthday)=1 and cast(birthday as datetime) = '2013-01-01';
--正确
select * from student where birthday='2013-01-01' and cast(birthday as datetime) = '2013-01-01';这是为什么呢?