File Removed
[csql.git] / test / tools / csql / datatype4.sql
blobaafb4001364217cdcdfe4623d29cbd8e4aa0be02
1 echo bit data type testing;
3 create table t1 (f1 bit, f2 bit));
4 insert into t1 values (0, 0);
5 insert into t1 values (1, 1);
6 insert into t1 values (0, 1);
7 insert into t1 values (1, 0);
8 echo select * from t1;
9 select * from t1;
10 echo select * from t1 where f1 = 1;
11 select * from t1 where f1 = 1;
12 echo select * from t1 where f1 = 1 AND f1 = 1;
13 select * from t1 where f1 = 1 AND f1 = 1;
14 echo select * from t1 where f1 != 0 AND f2 != 0 ;
15 select * from t1 where f1 != 0 AND f2 !=0 
16 echo select * from t1 where f1 = 12 AND f2 >= 22;
17 select * from t1 where f1 = 12 AND f2 >= 22;
19 echo select * from t1 where NOT f1 = 1;
20 select * from t1 where NOT f1 = 1;
21 echo select * from t1 where f1 != 1;
22 select * from t1 where f1 != 1;
23 echo select * from t1 where NOT f1 != 1;
24 select * from t1 where NOT f1 != 1;
26 echo select * from t1 where f1 = f2;
27 select * from t1 where f1 = f2;
29 echo update t1 set f2 = 1 where f1 != f2;
30 update t1 set f2 = 1 where f1 != f2;
31 select * from t1;
33 echo update t1 set f2 = 0 where f1 = 1;
34 update t1 set f2 = 0 where f1 = 1;
35 select * from t1;
37 delete from t1 where f1 = 1;
38 select * from t1;
39 drop table t1;