create table tb(st text) insert into tb select '20110815'select cast(CAST(ST as varchar(30)) as datetime) from tb/* ----------------------- 2011-08-15 00:00:00.000(1 行受影响)
create table tb(st text) insert into tb select '20110815'select convert(datetime,cast(st as varchar)) st from tbst ----------------------- 2011-08-15 00:00:00.000
insert into tb select '20110815'select cast(CAST(ST as varchar(30)) as datetime) from tb/*
-----------------------
2011-08-15 00:00:00.000(1 行受影响)
create table tb(st text)
insert into tb select '20110815'select convert(datetime,cast(st as varchar)) st from tbst
-----------------------
2011-08-15 00:00:00.000