在列中使用zerofill乡革,如果該列數(shù)據(jù)類型為int(4)寇僧,插入1,顯示0001沸版;如果插入55555嘁傀,顯示也是55555;插入負(fù)數(shù)顯示為0000视粮。因?yàn)镸ySQL自動增加UNSIGNED屬性 UNSIGNED不能為負(fù)數(shù)细办,當(dāng)插入負(fù)數(shù)時就顯示0。
#注意:column 緊跟兩個age
alter table mchopin change column age age int(11) unsigned zerofill;