I have created this table:
create table t(amount int(5));
and I have tried to insert these values:
insert into t values
(1),
(11),
(111),
(1111),
(11111),
(111111),
(11111111);
Why does the table accepts all the above values instead of the giving ERROR ?
Is there any solution for this problem ?
Int is always four bytes wide.
In the case of int(5) means
display-widthis 5To see its working use following query to create table
and insert number 20 .
Then if you try to run
select * from tyou will get following