22,300
社区成员




drop table test
create table test (d varchar(30))
insert into test values('2015-02-31')
insert into test values('2015-02-28')
select * from test
select cast(d as datetime) from test where isdate(d)=1
/*
d
------------------------------
2015-02-31
2015-02-28
(2 row(s) affected)
-----------------------
2015-02-28 00:00:00.000
*/