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
8 Statement Executed
: Rows Affected
= 1
9 Statement Executed
: Rows Affected
= 1
10 echo select * from t1
;
11 ---------------------------------------------------------
13 ---------------------------------------------------------
14 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
15 2002/1/1 1:1:1.0 2002/1/1 1:1:5.0
16 2002/1/1 1:1:1.0 2002/1/1 1:5:5.0
17 2002/1/1 1:1:1.0 2002/1/1 5:5:5.0
18 2002/1/1 1:1:1.0 2002/1/3 5:5:5.0
19 2002/1/1 1:1:1.0 2002/3/3 5:5:5.0
20 2002/1/1 1:1:1.0 2004/3/1 5:5:5.0
22 echo select * from t1 where timestamp_diff
(second
,f1
,f2
) =0;
23 ---------------------------------------------------------
25 ---------------------------------------------------------
26 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
28 echo select * from t1 where timestamp_diff
(second
,f2
,f1
) =4;
29 ---------------------------------------------------------
31 ---------------------------------------------------------
32 2002/1/1 1:1:1.0 2002/1/1 1:1:5.0
34 echo select * from t1 where timestamp_diff
(second
,f2
,f1
)<=244;
35 ---------------------------------------------------------
37 ---------------------------------------------------------
38 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
39 2002/1/1 1:1:1.0 2002/1/1 1:1:5.0
40 2002/1/1 1:1:1.0 2002/1/1 1:5:5.0
42 echo select * from t1 where timestamp_diff
(second
,f2
,f1
) =14644;
43 ---------------------------------------------------------
45 ---------------------------------------------------------
46 2002/1/1 1:1:1.0 2002/1/1 5:5:5.0
48 echo select * from t1 where timestamp_diff
(second
,f2
,f1
)>=14644;
49 ---------------------------------------------------------
51 ---------------------------------------------------------
52 2002/1/1 1:1:1.0 2002/1/1 5:5:5.0
53 2002/1/1 1:1:1.0 2002/1/3 5:5:5.0
54 2002/1/1 1:1:1.0 2002/3/3 5:5:5.0
55 2002/1/1 1:1:1.0 2004/3/1 5:5:5.0
57 echo select * from t1 where timestamp_diff
(second
,f2
,f1
) =187444;
58 ---------------------------------------------------------
60 ---------------------------------------------------------
61 2002/1/1 1:1:1.0 2002/1/3 5:5:5.0
63 echo select * from t1 where timestamp_diff
(second
,f2
,f1
) =5285044;
64 ---------------------------------------------------------
66 ---------------------------------------------------------
67 2002/1/1 1:1:1.0 2002/3/3 5:5:5.0
69 echo select * from t1 where timestamp_diff
(second
,f2
,f1
)!=5285044;
70 ---------------------------------------------------------
72 ---------------------------------------------------------
73 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
74 2002/1/1 1:1:1.0 2002/1/1 1:1:5.0
75 2002/1/1 1:1:1.0 2002/1/1 1:5:5.0
76 2002/1/1 1:1:1.0 2002/1/1 5:5:5.0
77 2002/1/1 1:1:1.0 2002/1/3 5:5:5.0
78 2002/1/1 1:1:1.0 2004/3/1 5:5:5.0
80 echo select * from t1 where timestamp_diff
(second
,f2
,f1
) =68270644;
81 ---------------------------------------------------------
83 ---------------------------------------------------------
84 2002/1/1 1:1:1.0 2004/3/1 5:5:5.0