mysql> SHOW CREATE TABLE test;+-------+----------------------------------------------------------------------------+|Table|CreateTable|+-------+----------------------------------------------------------------------------+| test | CREATE TABLE `test`(`id`int(11) NOT NULL AUTO_INCREMENT,`s`char(60) DEFAULT NULL, PRIMARY KEY (`id`) ENGINE=InnoDB DEFAULT CHARSET=latin1 |+-------+----------------------------------------------------------------------------+1 row inset(0.00 sec)
可以看到test表還是InnoDB引擎!!
4.使用SHOW TABLE STATUS from 數據庫庫名 where Name=’表名’;這是正確的方式
# mysql -uroot -p'mypassword'Welcome to the MySQL monitor.Commandsendwith;or \g.YourMySQL connection id is221Server version:5.1.41-3ubuntu12.7(Ubuntu)Type'help;'or'\h'for help.Type'\c' to clear the current input statement. mysql> SHOW TABLE STATUS from mytest whereName='test';+------------+--------+---------+------------+------+----------------+-------------+|Name|Engine|Version|Row_format|Rows|Avg_row_length|Data_length|+------------+--------+---------+------------+------+----------------+-------------+| test |MyISAM|10|Fixed|0|0|0|+------------+--------+---------+------------+------+----------------+-------------+1 row inset(0.02 sec) mysql>