I have created a table with 2 fields f1 as integer and f2 as int
for ex:
CSQL>CREATE TABLE t1(f1 integer,f2 int);
We can store maximum 2147483647 and minimum -2147483648 in both the fields
When i want to store values larger than the above value, it stores the same(2147483647) value in both integer and int field
As per the standard rule, when any one is trying to store value beyond its range, either the number should be rounded up clockwise/anticlock wise(c rule) or it should not be allowed(saying value larger than its range). But in CSQL when any body tries to store value beyond its range, it just stores the range values without providing any error or warning. The scenario i am given below.
SCENARIO 1:
CSQL>insert into t1 values(2147483647,2147483647);
Statement Executed: Rows Affected = 1
CSQL>insert into t1 values(-2147483648,-2147483648);
Statement Executed: Rows Affected = 1
CSQL>insert into t1 values(-2147483649,-2147483649);
Statement Executed: Rows Affected = 1
CSQL>insert into t1 values(2147483648,2147483648);
Statement Executed: Rows Affected = 1
CSQL>select * from t1;
---------------------------------------------------------
f1 f2
---------------------------------------------------------
2147483647 2147483647
-2147483648 -2147483648
-2147483648 -2147483648
2147483647 2147483647