tinyint(1) is same as tinyint (4) if columns don't use attribute ZEROFILL
Column skillId: tinyint(4) + ZEROFILL
# skillId = 20
SELECT skillId FROM skills;
# 0020 (length of '20' = 2 < 4 => fill ZERO)
Column skillId: tinyint(1) + ZEROFILL
# skillId = 20
SELECT skillId FROM skills;
# 20 (length of '20' = 2 > 1 => don't need fill ZERO)
Title:
MySQL tinyint(1) vs tinyint (4)
Description:
tinyint( 1 ) is same as tinyint ( 4 ) if columns don't use attribute ZEROFILL Column skillId: tinyint( 4 ) + ZEROFILL # skillId = 20 ...
...
Rating:
4