icity

MySQL外键关联(创世纪新篇)

耗尽温柔 提交于 2019-12-06 11:11:17
数据库外键 01.mysql> show create table country\G 02.*************************** 1. row *************************** 03. Table: country 04.Create Table: CREATE TABLE `country` ( 05. `country_id` smallint(5) unsigned NOT NULL auto_increment, 06. `country` varchar(50) NOT NULL, 07. `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, 08. PRIMARY KEY (`country_id`) 09.) ENGINE=InnoDB DEFAULT CHARSET=utf8 10.1 row in set (0.01 sec) 11. 12.mysql> show create table city\G 13.*************************** 1. row *************************** 14. Table: city 15.Create Table: