adding test scripts
[csql.git] / test / sql / ScalarFunction / timestamp_with_now.sql
blobbc1c36469c27312e00b3f7ea2a7a2af502a469ac
1 echo create table t1(f1 int,f2 timestamp);
2 create table t1(f1 int,f2 timestamp);
3 echo  insert into t1 values(1,'2003/12/10 10:20:20'); 
4 insert into t1 values(1,'2003/12/10 10:20:20');
5 echo  insert into t1 values(2,'2004/12/10 12:23:34');
6 insert into t1 values(2,'2004/12/10 12:23:34');
7 echo  insert into t1 values(3,'2005/12/10 01:21:41');
8 insert into t1 values(3,'2005/12/10 01:21:41');
9 echo  insert into t1 values(4,'2006/12/10 04:34:34');
10 insert into t1 values(4,'2006/12/10 04:34:34');
11 echo  insert into t1 values(5,now());
12 insert into t1 values(5,now());
13 echo  insert into t1 values(6,'2007/12/10 04:34:34'); 
14 insert into t1 values(6,'2007/12/10 04:34:34');
15 echo  insert into t1 values(7,now()); 
16 insert into t1 values(7,now());
17 echo  select * from t1; 
18 select * from t1;
19 echo  select * from t1 where f2<=now(); 
20 select * from t1 where f2<=now();
21 echo  select * from t1 where f2>now(); 
22 select * from t1 where f2>now();
23 echo  select * from t1; 
24 select * from t1;
25 echo  update t1 set f2=now() where f1<=2; 
26 update t1 set f2=now() where f1<=2;
27 echo  select * from t1; 
28 select * from t1;
29 echo  update t1 set f2=now(),f1=10 where f2='2007/12/10 04:34:34'; 
30 update t1 set f2=now(),f1=10 where f2='2007/12/10 04:34:34';
31 echo  select * from t1; 
32 select * from t1;
33 echo  drop table t1; 
34 drop table t1;