adding test scripts
[csql.git] / test / sql / ScalarFunction / time_with_now.sql
blob4b3ef795cdaa1e514974bcb836154b7bd95b1012
1 echo create table t1(f1 int,f2 time);
2 create table t1(f1 int,f2 time);
3 echo  insert into t1 values(1,'10:23:2'); 
4 insert into t1 values(1,'10:23:2');
5 echo  insert into t1 values(2,'09:12:23');
6 insert into t1 values(2,'09:12:23');
7 echo  insert into t1 values(3,'09:18:23');
8 insert into t1 values(3,'09:18:23');
9 echo  insert into t1 values(4,'06:23:23');
10 insert into t1 values(4,'06:23:23');
11 echo  insert into t1 values(5,now());
12 insert into t1 values(5,now());
13 echo  insert into t1 values(6,'05:34:32'); 
14 insert into t1 values(6,'05:34:32');
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='05:34:32'; 
30 update t1 set f2=now(),f1=10 where f2='05:34:32';
31 echo  select * from t1; 
32 select * from t1;
33 echo  drop table t1; 
34 drop table t1;