adding test scripts
[csql.git] / test / tools / csql / csql9.sql
blob02e9b963f8f7a88fdb188ab235f0c04d9accba36
1 echo Description:BETWEEN and IN test;
3 create table t1 (f1 int, f2 char(10), f3 int, primary key (f1));
4 insert into t1 values (10, '20', 10);
5 insert into t1 values (11, '21', 11);
6 insert into t1 values (12, '22', 12);
7 insert into t1 values (13, '23', 13);
8 insert into t1 values (14, '24', 14);
9 insert into t1 values (50, '50', 50);
10 echo  select * from t1 where f1 between 12 and 14;
11 select * from t1 where f1 between 12 and 14;
13 echo  select * from t1 where f1 not between 12 and 14;
14 select * from t1 where f1 not between 12 and 14;
16 echo  select * from t1 where f3 between 12 and 14;
17 select * from t1 where f3 between 12 and 14;
19 echo select * from t1 where f1 IN (12, 14, 50);
20 select * from t1 where f1 IN (12, 14, 50);
22 echo select * from t1 where f1 IN (12, 14, 50) AND f3 IN (50);
23 select * from t1 where f1 IN (12, 14, 50) AND f3 IN (50);
25 echo select * from t1 where f1 IN (12, 14, 50) OR f3 IN (50);
26 select * from t1 where f1 IN (12, 14, 50) OR f3 IN (50);
28 echo select * from t1 where f1 IN (12, 14, 50) AND f3 between 12 and 14; 
29 select * from t1 where f1 IN (12, 14, 50) AND f3 between 12 and 14;
31 echo select * from t1 where f1 NOT IN (12, 14, 50);
32 select * from t1 where f1 NOT IN (12, 14, 50);
33 drop table t1;