I've got a large table (~10,000) and I need one column to take up exactly three spaces. It almost always only takes up one space, but I need the other two spaces to be filled in with zeros (it's an integer column). is there a function for that?
Why would you do this? If it is because you want some report that queries the table to display one digit values as 3 digits, add the padding zeroes when you display it. Don't mix display information into your data.
Add ZEROFILL
attribute to the int column.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With