*** empty log message ***
[csql.git] / test / tools / csql / datatype8.sql
blob0b85703fe66d99b219fa319ea9ea400a16303fb5
1 echo LIKE operator char datatype testing;
3 create table t1 (f1 char(20), f2 char(20), primary key (f1));
4 insert into t1 values ('10', 'A');
5 insert into t1 values ('11', 'B');
6 insert into t1 values ('12', 'C');
7 insert into t1 values ('13', 'D');
8 insert into t1 values ('14', '14');
9 insert into t1 values ('50', 'E');
10 insert into t1 values ('This is really a very big string. should get cut when it is stored', 'E');
11 insert into t1 values ('UPPERCASE', 'UPPER');
12 insert into t1 values ('uppercase', 'LOWER');
13 insert into t1 values ('upperletter', 'LOWER');
14 insert into t1 values ('uppercaseletter', 'LOWER');
15 echo select * from t1;
16 select * from t1;
18 echo select * from t1 where f1 LIKE 'UPP%';
19 select * from t1 where f1 LIKE 'UPP%';
21 echo select * from t1 where f1 LIKE 'upp%';
22 select * from t1 where f1 LIKE 'upp%';
24 echo select * from t1 where f1 LIKE 'upper%letter';
25 select * from t1 where f1 LIKE 'upp%letter';
27 echo select * from t1 where f1 LIKE 'upper____letter';
28 select * from t1 where f1 LIKE 'upper____letter';
30 echo select * from t1 where f1 like 'UP__R%SE';
31 select * from t1 where f1 like 'UP__R%SE';
32 echo select * from t1 where f1 like 'UP__R%SE' and f2 = 'B';
33 select * from t1 where f1 like 'UP__R%SE' and f2 = 'B';
34 echo select * from t1 where f1 like 'UP__R%SE' and f2 = 'UPPER';
35 select * from t1 where f1 like 'UP__R%SE' and f2 = 'UPPER';
36 echo select * from t1 where f1 like 'UP__R%SE' and f2 like 'UPPER';
37 select * from t1 where f1 like 'UP__R%SE' and f2 like 'UP%ER';
38 drop table t1;