• bigint(10)和bigint(20)的区别


    1、bigint(10)和bigint(20)的区别在于如果表定义加上zerofill后再客户端显示长度不同,如下:

     MariaDB [test]> create table test2 (id bigint(10) zerofill,   
     -> id1 bigint(20) zerofill);

    MariaDB [test]> insert into test2 values(1,2);

    MariaDB [test]> select * from test2;

    id                   id1
    0000000001 00000000000000000002

    2、如果在创建bigint字段时,不指定长度,则默认长度为20,如下:

    mysql> create table test3 (id bigint);

    Query OK, 0 rows affected

    mysql> show create table test3;

    Table Create Table

    test3 CREATE TABLE `test3` (  `id` bigint(20) DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;

    3、无论是bigint(10),还是bigint(20)均占用8个字节,int和tinyinit类型类似。

  • 相关阅读:
    3、生成证书请求文件
    2、申请苹果App ID
    登录iOS Dev Center
    SQL Server 合并行
    asp 月末 月初
    linux
    ASP数组全集,多维数组和一维数组[转]
    oracle 秒
    oracle 存储过程 包 【转】
    linux
  • 原文地址:https://www.cnblogs.com/dragoncn/p/6594228.html
Copyright © 2020-2023  润新知