作者: 古飞_数据 | 来源:发表于2021-07-21 14:52 被阅读0次
    > show create table t1\G
    *************************** 1. row ***************************
           Table: t1
    Create Table: CREATE TABLE `t1` (
      `id` int(10) unsigned NOT NULL DEFAULT '0',
      `c1` int(10) unsigned NOT NULL DEFAULT '0',
      `c2` varchar(20) NOT NULL DEFAULT '',
      KEY `id` (`id`,`c1`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
    1 row in set (0.00 sec)
    
    CREATE TABLE `t1`(
    `c1` int NOT NULL,
    `c2` int unsigned NOT NULL,
    `c3` int unsigned NOT NULL,
    `x` int DEFAULT NULL,
    `c4` int unsigned NOT NULL DEFAULT '0',
    `dt` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`c1`),
    KEY `k1` (`c2`),
    KEY `k2` (`c3`)
    )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci STATS_PERSISTENT=1 STATS_AUTO_RECALC=1 STATS_SAMPLE_PAGES=50 ROW_FORMAT=DYNAMIC;
    
    >show create table ts1\G
    ***************************1.row ***************************
    Table: ts1
    Create Table:
    CREATE TABLE`ts1`(
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `ts` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `dt` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `chrt` char(20) NOT NULL,
    PRIMARY KEY (`id`)
    )ENGINE=InnoDB AUTO_INCREMENT=393211 DEFAULT CHARSET=utf8
    

    相关文章

      网友评论

          本文标题:

          本文链接:https://www.haomeiwen.com/subject/plejmltx.html