create table test(mobile varchar(11),paydate timestamp);insert into test(mobile,paydate) values('12345697832', '2010-01-11-14.00.00.000000');insert into test(mobile,paydate) values('12345697832', timestamp('2010-01-11-14.00.00.000000'));select mobile...
显示全部create table test(mobile varchar(11),paydate timestamp);
insert into test(mobile,paydate) values('12345697832', '2010-01-11-14.00.00.000000');
insert into test(mobile,paydate) values('12345697832', timestamp('2010-01-11-14.00.00.000000'));
select mobile,paydate from test;
select mobile,paydate from test;
completed successfully.
MOBILE PAYDATE
----------- --------------------------
12345697832 2010-01-11 14:00:00.000000
12345697832 2010-01-11 14:00:00.000000
2 rows selected in 0.01 secs.
正确的做法是先将源用scalar函数转成目的类型。
收起