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 1:1:1.0
15 2002/1/1 1:1:1.0 2002/3/1 1:1:1.0
16 2004/1/1 1:1:1.0 2004/2/1 1:1:1.0
17 2004/1/1 1:1:1.0 2004/3/1 1:1:1.0
18 2002/1/1 1:1:1.0 2004/3/1 1:1:1.0
20 echo select * from t1 where timestamp_diff
(day
,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
(day
,f2
,f1
)<=33;
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 1:1:1.0
32 2004/1/1 1:1:1.0 2004/2/1 1:1:1.0
34 echo select * from t1 where timestamp_diff
(day
,f2
,f1
) =59;
35 ---------------------------------------------------------
37 ---------------------------------------------------------
38 2002/1/1 1:1:1.0 2002/3/1 1:1:1.0
40 echo select * from t1 where timestamp_diff
(day
,f2
,f1
)>=59;
41 ---------------------------------------------------------
43 ---------------------------------------------------------
44 2002/1/1 1:1:1.0 2002/3/1 1:1:1.0
45 2004/1/1 1:1:1.0 2004/3/1 1:1:1.0
46 2002/1/1 1:1:1.0 2004/3/1 1:1:1.0
48 echo select * from t1 where timestamp_diff
(day
,f2
,f1
) =60;
49 ---------------------------------------------------------
51 ---------------------------------------------------------
52 2004/1/1 1:1:1.0 2004/3/1 1:1:1.0
54 echo select * from t1 where timestamp_diff
(day
,f2
,f1
)!=60;
55 ---------------------------------------------------------
57 ---------------------------------------------------------
58 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
59 2002/1/1 1:1:1.0 2002/2/3 1:1:1.0
60 2002/1/1 1:1:1.0 2002/3/1 1:1:1.0
61 2004/1/1 1:1:1.0 2004/2/1 1:1:1.0
62 2002/1/1 1:1:1.0 2004/3/1 1:1:1.0
64 echo select * from t1 where timestamp_diff
(day
,f2
,f1
) =790;
65 ---------------------------------------------------------
67 ---------------------------------------------------------
68 2002/1/1 1:1:1.0 2004/3/1 1:1:1.0
70 echo select * from t1 where timestamp_diff
(day
,f2
,f1
)!=790;
71 ---------------------------------------------------------
73 ---------------------------------------------------------
74 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
75 2002/1/1 1:1:1.0 2002/2/3 1:1:1.0
76 2002/1/1 1:1:1.0 2002/3/1 1:1:1.0
77 2004/1/1 1:1:1.0 2004/2/1 1:1:1.0
78 2004/1/1 1:1:1.0 2004/3/1 1:1:1.0