mysqlでテーブル定義の表示をする
「show create table テーブル名」コマンドでテーブル定義の表示をすることができます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
mysql> show create table kamo_table; +------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | kamo_table | CREATE TABLE `kamo_table` ( `id` int(11) NOT NULL DEFAULT '0', `name` text NOT NULL, `update_ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=ujis | +------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> |