adding test scripts
[csql.git] / test / tools / csql / datatype1.sql
blob99a6f7ee1213016871ce4ae86ce17839f6e7cf20
1 echo int data type testing;
3 create table t1 (f1 int, f2 int, 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 (-2147483648, 1);
9 insert into t1 values (2147483647, 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 2147483646 and 2147483647;
34 select * from t1 where f1 between 2147483646 and 2147483647;
35 echo select * from t1 where f1 between -2147483647 and -2147483648;
36 select * from t1 where f1 between -2147483647 and -2147483648;
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;