adding test scripts
[csql.git] / test / sql / ScalarFunction / time_sub_hour.sql
blob562beb8f929544bc8db30008bf0562a80a6f734d
1 echo Create table t1(f1 time, f2 time);
2 Create table t1(f1 time, f2 time);
3 insert into t1 values('01:01:01', '01:30:01');
4 insert into t1 values('02:01:01', '06:30:01');
5 insert into t1 values('03:01:01', '11:30:01');
6 insert into t1 values('04:01:01', '16:30:01');
7 insert into t1 values('05:01:01', '21:30:01');
8 echo select * from t1;
9 select * from t1;
10 echo select * from t1 where time_sub(f2 interval 2 hour)  = '14:30:01';
11 select * from t1 where time_sub(f2 interval 2 hour)  = '14:30:01';
12 echo select * from t1 where time_sub(f2 interval 2 hour) <= '14:30:01';
13 select * from t1 where time_sub(f2 interval 2 hour) <= '14:30:01';
14 echo select * from t1 where time_sub(f2 interval 2 hour) >= '14:30:01';
15 select * from t1 where time_sub(f2 interval 2 hour) >= '14:30:01';
16 echo select * from t1 where time_sub(f2 interval 26 hour) = '14:30:01';
17 select * from t1 where time_sub(f2 interval 26 hour) = '14:30:01';
18 echo select * from t1 where time_sub(f2 interval 26 hour)<= '14:30:01';
19 select * from t1 where time_sub(f2 interval 26 hour)<= '14:30:01';
20 echo select * from t1 where time_sub(f2 interval 26 hour)>= '14:30:01';
21 select * from t1 where time_sub(f2 interval 26 hour)>= '14:30:01';
22 echo select * from t1 where time_sub(f2 interval 26 hour)!= '14:30:01';
23 select * from t1 where time_sub(f2 interval 26 hour)!= '14:30:01';