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
10 ---------------------------------------------------------
12 ---------------------------------------------------------
13 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
14 2002/1/1 1:1:1.0 2002/2/3 5:1:1.0
15 2002/1/1 1:1:1.0 2002/3/1 5:1:1.0
16 2004/1/1 1:1:1.0 2004/2/1 5:1:1.0
17 2004/1/1 1:1:1.0 2004/3/1 5:1:1.0
18 2002/1/1 1:1:1.0 2004/3/1 5:1:1.0
20 echo select * from t1 where timestamp_diff
(hour
,f1
,f2
) =0;
21 ---------------------------------------------------------
23 ---------------------------------------------------------
24 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
26 echo select * from t1 where timestamp_diff
(hour
,f2
,f1
)<=1420;
27 ---------------------------------------------------------
29 ---------------------------------------------------------
30 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
31 2002/1/1 1:1:1.0 2002/2/3 5:1:1.0
32 2002/1/1 1:1:1.0 2002/3/1 5:1:1.0
33 2004/1/1 1:1:1.0 2004/2/1 5:1:1.0
35 echo select * from t1 where timestamp_diff
(hour
,f2
,f1
) =748;
36 ---------------------------------------------------------
38 ---------------------------------------------------------
39 2004/1/1 1:1:1.0 2004/2/1 5:1:1.0
41 echo select * from t1 where timestamp_diff
(hour
,f2
,f1
)>=748;
42 ---------------------------------------------------------
44 ---------------------------------------------------------
45 2002/1/1 1:1:1.0 2002/2/3 5:1:1.0
46 2002/1/1 1:1:1.0 2002/3/1 5:1:1.0
47 2004/1/1 1:1:1.0 2004/2/1 5:1:1.0
48 2004/1/1 1:1:1.0 2004/3/1 5:1:1.0
49 2002/1/1 1:1:1.0 2004/3/1 5:1:1.0
51 echo select * from t1 where timestamp_diff
(hour
,f2
,f1
) =1444;
52 ---------------------------------------------------------
54 ---------------------------------------------------------
55 2004/1/1 1:1:1.0 2004/3/1 5:1:1.0
57 echo select * from t1 where timestamp_diff
(hour
,f2
,f1
)!=1444;
58 ---------------------------------------------------------
60 ---------------------------------------------------------
61 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
62 2002/1/1 1:1:1.0 2002/2/3 5:1:1.0
63 2002/1/1 1:1:1.0 2002/3/1 5:1:1.0
64 2004/1/1 1:1:1.0 2004/2/1 5:1:1.0
65 2002/1/1 1:1:1.0 2004/3/1 5:1:1.0
67 echo select * from t1 where timestamp_diff
(hour
,f2
,f1
) =18964;
68 ---------------------------------------------------------
70 ---------------------------------------------------------
71 2002/1/1 1:1:1.0 2004/3/1 5:1:1.0
73 echo select * from t1 where timestamp_diff
(hour
,f2
,f1
)!=18964;
74 ---------------------------------------------------------
76 ---------------------------------------------------------
77 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
78 2002/1/1 1:1:1.0 2002/2/3 5:1:1.0
79 2002/1/1 1:1:1.0 2002/3/1 5:1:1.0
80 2004/1/1 1:1:1.0 2004/2/1 5:1:1.0
81 2004/1/1 1:1:1.0 2004/3/1 5:1:1.0