An int(11) is not what you think it is in MySQL

5 · Amit Merchant · March 28, 2023, 2:39 p.m.
Here’s the biggest myth I had about MySQL’s int data type that just got busted while watching one of the videos from the course MySQL for Developers. Essentially, I have been doing it wrong all this time. So, when designing a database schema I have always been using int(11) as the default data type for any integer column (and I suppose you might have done this at some point). But I never knew what that 11 signifies. I just assumed that it was the default length of the integer column. But, it tur...