1 echo Create table t1
(f1 timestamp
, f2 timestamp
);
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 ---------------------------------------------------------
12 2001/1/1 1:1:1.0 2001/5/10 1:1:1.0
13 2002/1/1 1:1:1.0 2002/3/10 1:1:1.0
14 2003/1/1 1:1:1.0 2003/3/10 1:1:1.0
15 2004/1/1 1:1:1.0 2004/3/10 1:1:1.0
16 2005/1/1 1:1:1.0 2005/2/10 1:1:1.0
18 echo select * from t1 where timestamp_sub
(f2 interval
15 day
) ='2001-04-25 01:01:01';
19 ---------------------------------------------------------
21 ---------------------------------------------------------
22 2001/1/1 1:1:1.0 2001/5/10 1:1:1.0
24 echo select * from t1 where timestamp_sub
(f2 interval
15 day
)<='2002-02-23 01:01:01';
25 ---------------------------------------------------------
27 ---------------------------------------------------------
28 2001/1/1 1:1:1.0 2001/5/10 1:1:1.0
29 2002/1/1 1:1:1.0 2002/3/10 1:1:1.0
31 echo select * from t1 where timestamp_sub
(f2 interval
15 day
)>='2003-02-23 01:01:01';
32 ---------------------------------------------------------
34 ---------------------------------------------------------
35 2003/1/1 1:1:1.0 2003/3/10 1:1:1.0
36 2004/1/1 1:1:1.0 2004/3/10 1:1:1.0
37 2005/1/1 1:1:1.0 2005/2/10 1:1:1.0
39 echo select * from t1 where timestamp_sub
(f2 interval
15 day
) ='2004-02-24 01:01:01';
40 ---------------------------------------------------------
42 ---------------------------------------------------------
43 2004/1/1 1:1:1.0 2004/3/10 1:1:1.0
45 echo select * from t1 where timestamp_sub
(f2 interval
15 day
)!='2005-01-26 01:01:01';
46 ---------------------------------------------------------
48 ---------------------------------------------------------
49 2001/1/1 1:1:1.0 2001/5/10 1:1:1.0
50 2002/1/1 1:1:1.0 2002/3/10 1:1:1.0
51 2003/1/1 1:1:1.0 2003/3/10 1:1:1.0
52 2004/1/1 1:1:1.0 2004/3/10 1:1:1.0
54 echo select * from t1 where timestamp_sub
(f2 interval
45 day
) ='2004-12-27 01:01:01';
55 ---------------------------------------------------------
57 ---------------------------------------------------------
58 2005/1/1 1:1:1.0 2005/2/10 1:1:1.0
60 echo select * from t1 where timestamp_sub
(f2 interval
45 day
)!='2004-12-27 01:01:01';
61 ---------------------------------------------------------
63 ---------------------------------------------------------
64 2001/1/1 1:1:1.0 2001/5/10 1:1:1.0
65 2002/1/1 1:1:1.0 2002/3/10 1:1:1.0
66 2003/1/1 1:1:1.0 2003/3/10 1:1:1.0
67 2004/1/1 1:1:1.0 2004/3/10 1:1:1.0