1 echo Create table t1
(f1
date, f2
date);
3 Statement Executed
: Rows Affected
= 1
4 Statement Executed
: Rows Affected
= 1
5 Statement Executed
: Rows Affected
= 1
6 Statement Executed
: Rows Affected
= 1
7 Statement Executed
: Rows Affected
= 1
9 ---------------------------------------------------------
11 ---------------------------------------------------------
18 echo select * from t1 where date_add
(f1 interval
4 year
) = '2007-01-01';
19 ---------------------------------------------------------
21 ---------------------------------------------------------
24 echo select * from t1 where date_add
(f1 interval
4 year
) = f2
;
25 ---------------------------------------------------------
27 ---------------------------------------------------------
32 echo select * from t1 where date_add
(f1 interval
4 year
) <= '2007-01-01';
33 ---------------------------------------------------------
35 ---------------------------------------------------------
40 echo select * from t1 where date_add
(f1 interval
4 year
) > '2007-01-01';
41 ---------------------------------------------------------
43 ---------------------------------------------------------