摘要:
2张表之间通过主键形成一对一映射关系,如一个人只能有一张身份证:t_identity_card表建表语句:CREATE TABLE `t_identity_card` ( `id` int(11) NOT NULL, `identity` int(11) NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=gb2312;t_person表建表语句:CREATE TABLE `t_person` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `age` ... 阅读全文