mysql 与表相关的命令

来源:互联网 发布:长者网络含义 编辑:程序博客网 时间:2024/06/02 03:55
mysql> show tables;+----------------+| Tables_in_test |+----------------+| t1             |+----------------+1 row in set (0.00 sec)mysql> show create table t1 \G;*************************** 1. row ***************************       Table: t1Create Table: CREATE TABLE `t1` (  `empno` int(10) DEFAULT NULL,  `name` varchar(40) DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=latin11 row in set (0.00 sec)ERROR: No query specifiedmysql> show columns from t1 (同义语句 desc t1)+-------+-------------+------+-----+---------+-------+| Field | Type        | Null | Key | Default | Extra |+-------+-------------+------+-----+---------+-------+| empno | int(10)     | YES  |     | NULL    |       || name  | varchar(40) | YES  |     | NULL    |       |+-------+-------------+------+-----+---------+-------+2 rows in set (0.00 sec)mysql> show table status \G;*************************** 1. row ***************************           Name: t1         Engine: InnoDB        Version: 10     Row_format: Compact           Rows: 4 Avg_row_length: 4096    Data_length: 16384Max_data_length: 0   Index_length: 0      Data_free: 0 Auto_increment: NULL    Create_time: 2015-02-17 02:26:19    Update_time: NULL     Check_time: NULL      Collation: latin1_swedish_ci       Checksum: NULL Create_options:         Comment: 1 row in set (0.00 sec)ERROR: No query specified

0 0
原创粉丝点击