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
2 day
) = '2010-03-01';
19 ---------------------------------------------------------
21 ---------------------------------------------------------
24 echo select * from t1 where date_add
(f1 interval
15 day
) <= '2008-02-04';
25 ---------------------------------------------------------
27 ---------------------------------------------------------
30 echo select * from t1 where date_add
(f1 interval
15 day
) >= '2009-05-05';
31 ---------------------------------------------------------
33 ---------------------------------------------------------
39 echo select * from t1 where date_add
(f1 interval
40 day
) <= '2008-03-01';
40 ---------------------------------------------------------
42 ---------------------------------------------------------
45 echo select * from t1 where date_add
(f1 interval
40 day
) >= '2009-05-30';
46 ---------------------------------------------------------
48 ---------------------------------------------------------
54 echo select * from t1 where date_add
(f1 interval
365 day
) <= '2010-04-20';
55 ---------------------------------------------------------
57 ---------------------------------------------------------
61 echo select * from t1 where date_add
(f1 interval
366 day
) >= '2010-04-21';
62 ---------------------------------------------------------
64 ---------------------------------------------------------