mysql 显示ddl_MySQL查看自增ID和表DDL等信息

MySQL 查看数据库表相关信息和自增 ID 方法如下:

方法一MariaDB [test]> show create table wikiarchive \G;

*************************** 1. row ***************************

Table: wikiarchive

Create Table: CREATE TABLE `wikiarchive` (

`ar_id` int(10) unsigned NOT NULL AUTO_INCREMENT,

`ar_namespace` int(11) NOT NULL DEFAULT '0',

`ar_title` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',

`ar_text` mediumblob NOT NULL,

`ar_comment` varbinary(767) NOT NULL,

`ar_user` int(10) unsigned NOT NULL DEFAULT '0',

`ar_user_text` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,

PRIMARY KEY (`ar_id`),

KEY `name_title_timestamp` (`ar_namespace`,`ar_title`,`ar_timestamp`),

KEY `usertext_timestamp` (`ar_user_text`,`ar_timestamp`),

KEY `ar_revid` (`ar_rev_id`)

) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8

1 row in set (0.00 sec)

ERROR: No query specified

方法 二MariaDB [test]> show table status like 'wikiarchive' \G

*************************** 1. row ***************************

Name: wikiarchive

Engine: InnoDB

Version: 10

Row_format: Compact

Rows: 0

Avg_row_length: 0

Data_length: 16384

Max_data_length: 0

Index_length: 49152

Data_free: 0

Auto_increment: 6

Create_time: 2017-03-02 09:53:39

Update_time: NULL

Check_time: NULL

Collation: utf8_general_ci

Checksum: NULL

Create_options:

Comment:

1 row in set (0.00 sec)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值