1create table t1 (a date); 2insert t1 values ('2000-01-02'), ('2001-02-03'), ('2002-03-04'); 3SET STATEMENT debug_dbug='d,str_to_datetime_warn' for 4select * from t1 where a > date_add('2000-01-01', interval 5 day); 5a 62001-02-03 72002-03-04 8Warnings: 9Note 1003 2000-01-01 10drop table t1; 11create table t1 (id int not null, ut timestamp(6) not null); 12insert into t1 values(1, '2001-01-01 00:00:00.2'); 13insert into t1 values(1, '2001-01-01 00:00:00.1'); 14select * from t1; 15id ut 161 2001-01-01 00:00:00.200000 171 2001-01-01 00:00:00.100000 18select (select max(m2.ut) from t1 m2 where m1.id <> 0) from t1 m1; 19(select max(m2.ut) from t1 m2 where m1.id <> 0) 202001-01-01 00:00:00.200000 212001-01-01 00:00:00.200000 22drop table t1; 23