adding test scripts
[csql.git] / test / tools / csql / datatype7.sql
blobe907d6f44ffbb0ac9eda4b9fd8f5436a73ea9ad5
1 echo bigint data type testing;
3 create table t1 (f1 bigint, f2 bigint,  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 (-9223372036854775808, 1);
9 insert into t1 values (9223372036854775807, 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 999999999997 and 999999999999;
34 select * from t1 where f1 between 999999999997 and 999999999999;
36 echo select * from t1 where f1 between -999999999999 and -999999999997;
37 select * from t1 where f1 between -999999999999 and -999999999997;
39 echo update t1 set f2 = 2 where f1 != f2;
40 update t1 set f2 = 2 where f1 != f2;
41 select * from t1;
43 echo update t1 set f2 = 3 where f1 = 50;
44 update t1 set f2 = 3 where f1 = 50;
45 select * from t1;
47 delete from t1 where f1 = 50;
48 select * from t1;
49 drop table t1;