Insert 4 digit only in database mysql

hi guys…
i want to insert ID NUMBER in my table, ex. i want to insert “1” and in table stored “0001”, if i insert “12”, in table stored “0012”. The point is i want to insert 4 digits in my table. Can my master help my problem?

use CHAR(4) and explicitly insert the zeroes

the other problem is, in my table is not only insert the id number but also year() function, so it mixed, can my master fix it?

fixing not required, year function will also fit into CHAR(4)

:slight_smile: