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/1/1 2:1:1.0
13 2002/1/1 1:1:1.0 2001/2/1 1:1:1.0
14 2003/1/1 1:1:1.0 2001/3/1 1:1:1.0
15 2004/1/1 1:1:1.0 2002/4/1 1:1:1.0
16 2005/1/1 1:1:1.0 2002/5/1 1:1:1.0
18 echo select * from t1 where timestamp_sub
(f1 interval
5 year
) ='1998-01-01 01:01:01';
19 ---------------------------------------------------------
21 ---------------------------------------------------------
22 2003/1/1 1:1:1.0 2001/3/1 1:1:1.0
24 echo select * from t1 where timestamp_sub
(f1 interval
5 year
)<='1998-01-01 01:01:01';
25 ---------------------------------------------------------
27 ---------------------------------------------------------
28 2001/1/1 1:1:1.0 2001/1/1 2:1:1.0
29 2002/1/1 1:1:1.0 2001/2/1 1:1:1.0
30 2003/1/1 1:1:1.0 2001/3/1 1:1:1.0
32 echo select * from t1 where timestamp_sub
(f1 interval
5 year
) >'1998-01-01 01:01:01';
33 ---------------------------------------------------------
35 ---------------------------------------------------------
36 2004/1/1 1:1:1.0 2002/4/1 1:1:1.0
37 2005/1/1 1:1:1.0 2002/5/1 1:1:1.0
39 echo select * from t1 where timestamp_sub
(f1 interval
5 year
)!='1998-01-01 01:01:01';
40 ---------------------------------------------------------
42 ---------------------------------------------------------
43 2001/1/1 1:1:1.0 2001/1/1 2:1:1.0
44 2002/1/1 1:1:1.0 2001/2/1 1:1:1.0
45 2004/1/1 1:1:1.0 2002/4/1 1:1:1.0
46 2005/1/1 1:1:1.0 2002/5/1 1:1:1.0