1 echo float data type testing;
2 create table t1 (f1 float, f2 float);
3 insert into t1 values (0.1048575, 10.234);
4 insert into t1 values (-0.1048575, 11.234);
5 insert into t1 values (12.234, 11.456);
6 insert into t1 values (13.123, 11.987);
7 insert into t1 values (14.467, 12.123);
8 insert into t1 values (50.345, 10.234);
9 insert into t1 values (123.456E3, 10.234);
10 insert into t1 values (123456E-3, 10.234);
11 echo select * from t1;
14 echo select * from t1 where f1 BETWEEN 0.104856 AND 0.104858
15 select * from t1 where f1 BETWEEN 0.104856 AND 0.104858;
17 echo select * from t1 where f1 >122 AND f1 <124;
18 select * from t1 where f1 >122 AND f1 <124;
20 echo select * from t1 where f1 BETWEEN -0.104859 AND -0.104856
21 select * from t1 where f1 BETWEEN -0.104859 AND -0.104856;
23 echo select * from t1 where f1 BETWEEN -124 AND -122
24 select * from t1 where f1 BETWEEN -124 AND -122;
26 echo select * from t1 where f2 < f1;
27 select * from t1 where f2 < f1;
29 echo update t1 set f2 = 3.4345 where f2 >11;
30 update t1 set f2 = 3.4335 where f2>11;
33 echo delete from t1 where f1 > 14.234;
34 delete from t1 where f1 > 14.234;