*** empty log message ***
[csql.git] / test / tools / csql / datatype9.sql
blob0ce8f0daf152d921269a00bd0e21216f62cd2e48
1 echo tinyint data type testing;
3 create table t1 (f1 tinyint, f2 tinyint, primary key (f1));
4 insert into t1 values (10, 1);
5 insert into t1 values (11, 1);
6 insert into t1 values (12, 1);
7 insert into t1 values (13, 1);
8 insert into t1 values (-128, 1);
9 insert into t1 values (127, 1);
10 echo select * from t1;
11 select * from t1;
12 echo select * from t1 where f1 = 10;
13 select * from t1 where f1 = 10;
14 echo select * from t1 where f1 != 12 AND f2 <= 13;
15 select * from t1 where f1 != 12 AND f2 <= 13;
16 echo select * from t1 where f1 = 12 AND f2 >= 22;
17 select * from t1 where f1 = 12 AND f2 >= 22;
18 echo select * from t1 where f1 = 12 OR  f1 > 13;
19 select * from t1 where f1 = 12 OR  f1 > 13;
20 echo select * from t1 where f1 = 12 OR f2 < 13;
21 select * from t1 where f1 = 12 OR f2 < 13;
22 echo select * from t1 where f1 = 12 OR f2 <> 22;
23 select * from t1 where f1 = 12 OR f2 <> 22;
24 echo select * from t1 where NOT f1 = 12;
25 select * from t1 where NOT f1 = 12;
26 echo select * from t1 where f1 != 12;
27 select * from t1 where f1 != 12;
28 echo select * from t1 where NOT f1 != 12;
29 select * from t1 where NOT f1 != 12;
30 echo select * from t1 where f1 = f2;
31 select * from t1 where f1 = f2;
33 echo select * from t1 where f1 between 126 and 127;
34 select * from t1 where f1 between 126 and 127;
35 echo select * from t1 where f1 between -127 and -128;
36 select * from t1 where f1 between -127 and -128;
38 echo update t1 set f2 = 2 where f1 != f2;
39 update t1 set f2 = 2 where f1 != f2;
40 select * from t1;
42 echo update t1 set f2 = 3 where f1 = 12;
43 update t1 set f2 = 3 where f1 = 12;
44 select * from t1;
46 delete from t1 where f1 = 12;
47 select * from t1;
48 drop table t1;