I need MySQL to store numbers in a integer field and maintain leading zeros. I cannot use the zerofill option as my current field is Bigint(16) and numbers can vary in amoun
You can still sort the string(CHAR/VARCHAR) columns like integer using CAST
ORDER BY CAST(`col_name` AS SIGNED) DESC
So, you can store them in CHAR/ VARCHAR type fields.