https://blog.csdn.net/m0_37479246/article/details/79964672?utm_term=mysql%E8%AE%BE%E7%BD%AE%E9%9B%B6%E5%A1%AB%E5%85%85&utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~all~sobaiduweb~default-0-79964672&spm=3001.4430

zerofill: 当插入的数值比定义的属性长度小的时候,会在数值前面进行补值操作。

创建表

create table table_name (

id bigint(20) NULL,
order_no int(6) unsigned zerofill NULL

 

 

);

插入数据:

 

 

INSERT INTO table_name VALUES(2,5)
查数据:
SELECT * FROM table_name
mysql 补零操作(zerofill)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
猜你喜欢
  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2022-02-19
  • 2022-12-23
相关资源
相似解决方案