adding test scripts
[csql.git] / test / sql / ScalarFunction / timestamp_add_second.sql
blob6d2fdf099621f68bf2d2e23134e0746ecc3eefea
1 echo Create table t1(f1 timestamp, f2 timestamp);
2 Create table t1(f1 timestamp, f2 timestamp);
3 insert into t1 values('2001-01-01 01:01:01', '2001-01-25 01:01:01');
4 insert into t1 values('2002-01-01 01:01:01', '2002-02-25 01:01:01');
5 insert into t1 values('2003-01-01 01:01:01', '2003-02-25 01:01:01');
6 insert into t1 values('2004-01-01 01:01:01', '2004-02-25 01:01:01');
7 insert into t1 values('2005-01-01 01:01:01', '2005-11-25 01:01:01');
8 echo select * from t1;
9 select * from t1;
10 echo select * from t1 where timestamp_add(f2 interval 14644 second) ='2003-02-25 05:05:05'; 
11 select * from t1 where timestamp_add(f2 interval 14644 second) ='2003-02-25 05:05:05'; 
12 echo select * from t1 where timestamp_add(f2 interval 14644 second)<='2003-02-25 05:05:05'; 
13 select * from t1 where timestamp_add(f2 interval 14644 second)<='2003-02-25 05:05:05'; 
14 echo select * from t1 where timestamp_add(f2 interval 14644 second) >'2003-02-25 05:05:05'; 
15 select * from t1 where timestamp_add(f2 interval 14644 second) >'2003-02-25 05:05:05'; 
16 echo select * from t1 where timestamp_add(f2 interval 878644 second) ='2001-02-04 05:05:05'; 
17 select * from t1 where timestamp_add(f2 interval 878644 second) ='2001-02-04 05:05:05'; 
18 echo select * from t1 where timestamp_add(f2 interval 878644 second) ='2002-03-07 05:05:05'; 
19 select * from t1 where timestamp_add(f2 interval 878644 second) ='2002-03-07 05:05:05'; 
20 echo select * from t1 where timestamp_add(f2 interval 878644 second) ='2004-03-06 05:05:05'; 
21 select * from t1 where timestamp_add(f2 interval 878644 second) ='2004-03-06 05:05:05'; 
22 echo select * from t1 where timestamp_add(f2 interval 3470644 second) ='2006-01-04 05:05:05'; 
23 select * from t1 where timestamp_add(f2 interval 3470644 second) ='2006-01-04 05:05:05';