adding test scripts
[csql.git] / test / sql / Predicate / varchar_logical.sql
blob0ec851af05ae943ffc4ca8c3cabd18aa7f5d18da
1 echo Create table t1(f1 varchar(10), f2 char(10), f3 varchar(10), f4 int);
2 Create table t1(f1 varchar(10), f2 char(10), f3 varchar(10), f4 int);
3 Insert into t1 values('CSQL1', 'LAKS1','BBSR1',10);
4 Insert into t1 values('CSQL1', 'LAKS1','BBSR2',20);
5 Insert into t1 values('CSQL1', 'LAKS2','BBSR3',30);
6 Insert into t1 values('CSQL1', 'LAKS2','BBSR4',40);
7 Insert into t1 values('CSQL2', 'LAKS3','BBSR5',50);
8 Insert into t1 values('CSQL2', 'LAKS3','BBSR6',60);
9 Insert into t1 values('CSQL2', 'LAKS4','BBSR7',70);
10 Insert into t1 values('CSQL2', 'LAKS4','BBSR8',80);
11 echo select * from t1;
12 select * from t1;
13 echo select * from t1 where f1='CSQL2';
14 select * from t1 where f1='CSQL2';
15 echo select * from t1 where not(f1='CSQL2');
16 select * from t1 where not(f1='CSQL2');
17 echo select * from t1 where f1='CSQL1' and f2='LAKS1';
18 select * from t1 where f1='CSQL1' and f2='LAKS1';
19 echo select * from t1 where f2='LAKS1' and not(f1='CSQL2');
20 select * from t1 where f2='LAKS1' and not(f1='CSQL2');
21 echo select * from t1 where f1='CSQL1' and f2='LAKS1' and f3='BBSR1';
22 select * from t1 where f1='CSQL1' and f2='LAKS1' and f3='BBSR1';
23 echo select * from t1 where f1='CSQL1' and f2='LAKS1' and not(f3='BBSR1');
24 select * from t1 where f1='CSQL1' and f2='LAKS1' and not(f3='BBSR1');
25 echo select * from t1 where f1='CSQL1' and f2='LAKS1' and not(f4=20);
26 select * from t1 where f1='CSQL1' and f2='LAKS1' and not(f4=20);
27 echo select * from t1 where f1='CSQL1' and f2='LAKS1' or not(f4=20);
28 select * from t1 where f1='CSQL1' and f2='LAKS1' or not(f4=20);
29 echo select * from t1 where f1='CSQL1' or f2='LAKS1' and not(f4=20);
30 select * from t1 where f1='CSQL1' or f2='LAKS1' and not(f4=20);