1.int或者tinyint等数值型字段的存储范围已经是固定的,和类型相关
2.后面的数字只与显示有关,并且是在开启了zerofill前导零填充的前提下

3.显示的时候,在前面用0补全了

create table my_test(
	id int unsigned,
	nums int(2) zerofill,
	age  int(2)
);
insert into my_test value(1,1,1);
select * from my_test;  

[MySQL] mysql int后面的数字与前导零填充

 

  

相关文章:

  • 2021-12-04
  • 2022-12-23
  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-24
猜你喜欢
  • 2022-02-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2021-11-04
相关资源
相似解决方案