Test script modification and exp file generation
[csql.git] / test / tools / csql / datatype3.sql
blob3cf32b587b25ee18047a4b5d1b29736906d00b42
1 echo smallint data type testing;
3 create table t1 (f1 smallint, f2 smallint, 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 (-9998, 1);
9 insert into t1 values (9998, 1);
10 insert into t1 values (50, 23);
11 echo select * from t1;
12 select * from t1;
13 echo select * from t1 where f1 = 10;
14 select * from t1 where f1 = 10;
15 echo select * from t1 where f1 != 12 AND f2 <= 13;
16 select * from t1 where f1 != 12 AND f2 <= 13;
17 echo select * from t1 where f1 = 12 AND f2 >= 22;
18 select * from t1 where f1 = 12 AND f2 >= 22;
19 echo select * from t1 where f1 = 12 OR  f1 > 13;
20 select * from t1 where f1 = 12 OR  f1 > 13;
21 echo select * from t1 where f1 = 12 OR f2 < 13;
22 select * from t1 where f1 = 12 OR f2 < 13;
23 echo select * from t1 where f1 = 12 OR f2 <> 22;
24 select * from t1 where f1 = 12 OR f2 <> 22;
25 echo select * from t1 where NOT f1 = 12;
26 select * from t1 where NOT f1 = 12;
27 echo select * from t1 where f1 != 12;
28 select * from t1 where f1 != 12;
29 echo select * from t1 where NOT f1 != 12;
30 select * from t1 where NOT f1 != 12;
31 echo select * from t1 where f1 = f2;
32 select * from t1 where f1 = f2;
34 echo select * from t1 where f1 between 9997 and 9999;
35 select * from t1 where f1 between 9997 and 9999;
37 echo select * from t1 where f1 between -9999 and -9997;
38 select * from t1 where f1 between -9999 and -9997;
40 echo update t1 set f2 = 2 where f1 != f2;
41 update t1 set f2 = 2 where f1 != f2;
42 select * from t1;
44 echo update t1 set f2 = 3 where f1 = 50;
45 update t1 set f2 = 3 where f1 = 50;
46 select * from t1;
48 delete from t1 where f1 = 50;
49 select * from t1;
50 drop table t1;