原文链接:https://blog.csdn.net/qq_25814163/article/details/120725584
-- ---------------------------- -- 客户表 -- ---------------------------- drop table if exists my_customer; create table my_customer ( customer_id bigint(20) not null auto_increment comment '客户id', customer_name varchar(30) default '' comment '客户姓名', phonenumber varchar(11) default '' comment '手机号码', sex varchar(20) default null comment '客户性别', birthday datetime comment '客户生日', remark varchar(500) default null comment '客户描述', primary key (customer_id) ) engine=innodb auto_increment=1 comment = '测试客户表'; -- ---------------------------- -- 客户联系人表 -- ---------------------------- drop table if exists my_client; create table my_client ( client_id int(11) auto_increment comment '编号', customer_id bigint(20) not null comment '客户id', client_name varchar(30) default '' comment '联系人名称', client_phone varchar(11) default null comment '手机号码', primary key (client_id) ) engine=innodb auto_increment=1 comment = '客户联系人表';