File Removed
[csql.git] / test / tools / csql / datatype3.sql
blobff8f11eb686b0ff7a25ecb9839a2cd82ea879994
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 f2 < 13;
20 select * from t1 where f1 = 12 OR f2 < 13;
21 echo select * from t1 where f1 = 12 OR f2 <> 22;
22 select * from t1 where f1 = 12 OR f2 <> 22;
23 echo select * from t1 where NOT f1 = 12;
24 select * from t1 where NOT f1 = 12;
25 echo select * from t1 where f1 != 12;
26 select * from t1 where f1 != 12;
27 echo select * from t1 where NOT f1 != 12;
28 select * from t1 where NOT f1 != 12;
29 echo select * from t1 where f1 = f2;
30 select * from t1 where f1 = f2;
32 echo select * from t1 where f1 between 9997 and 9999;
33 select * from t1 where f1 between 9997 and 9999;
35 echo select * from t1 where f1 between -9999 and -9997;
36 select * from t1 where f1 between -9999 and -9997;
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 = 50;
43 update t1 set f2 = 3 where f1 = 50;
44 select * from t1;
46 delete from t1 where f1 = 50;
47 select * from t1;
48 drop table t1;