1.查看 ? create table
- mysql> ? create table
-
Name: 'CREATE TABLE'
-
Description:
-
Syntax:
-
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
-
(create_definition,...)
-
[table_options]
-
[partition_options]
2. 创建一个 myisam引擎的表
- mysql> create table tt (id int) engine=myisam;
-
Query OK, 0 rows affected (0.03 sec)
-
mysql>
3.查看是哪种引擎的表
- mysql> show create table tt \G;
-
*************************** 1. row ******************
-
*********
-
Table: tt
-
Create Table: CREATE TABLE `tt` (
-
`id` int(11) DEFAULT NULL
-
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-
1 row in set (0.03 sec)
-
ERROR:
-
No query specified
-
mysql>
\G解释:ego (\G) Send command to mysql server, display result vertically.
或者这种方法也可以查看引擎的表
- ysql> show table status like 'tt' \G;
-
*************************** 1. row ******************
-
*********
-
Name: tt
-
Engine: MyISAM ###引擎
-
Version: 10
-
Row_format: Fixed
-
Rows: 0
-
Avg_row_length: 0
-
Data_length: 0
-
Max_data_length: 1970324836974591
-
Index_length: 1024
-
Data_free: 0
-
Auto_increment: NULL
-
Create_time: 2011-08-05 13:35:18
-
Update_time: 2011-08-05 13:35:18
-
Check_time: NULL
-
Collation: latin1_swedish_ci
-
Checksum: NULL
-
Create_options:
-
Comment:
-
1 row in set (0.05 sec)
-
-
ERROR:
-
No query specified
-
mysql>
-
-
-
mysql> show databases;
-
mysql> use information_schema;
-
Database changed
-
mysql> show tables;
-
mysql> desc tables;
-
mysql> select * from tables where table_name='tt' \G;
-
*************************** 1. row ******************
-
*********
-
TABLE_CATALOG: NULL
-
TABLE_SCHEMA: test1
-
TABLE_NAME: tt
-
TABLE_TYPE: BASE TABLE
-
ENGINE: MyISAM
-
VERSION: 10
-
ROW_FORMAT: Fixed
-
TABLE_ROWS: 0
-
AVG_ROW_LENGTH: 0
-
DATA_LENGTH: 0
-
MAX_DATA_LENGTH: 1970324836974591
-
INDEX_LENGTH: 1024
-
DATA_FREE: 0
-
AUTO_INCREMENT: NULL
-
CREATE_TIME: 2011-08-05 13:35:18
-
UPDATE_TIME: 2011-08-05 13:35:18
-
CHECK_TIME: NULL
-
TABLE_COLLATION: latin1_swedish_ci
-
CHECKSUM: NULL
-
CREATE_OPTIONS:
-
TABLE_COMMENT:
-
1 row in set (0.02 sec)
-
-
ERROR:
-
No query specified
阅读(701) | 评论(0) | 转发(0) |