34,837
社区成员




# 先创建部门表
create table dept(
d_no int(11) primary key auto_increment not null unique,
d_name varchar(50) not null,
d_location varchar(100)
);
# 再创建员工表,dept_no 是外键, 与 部分门表关联
create table employee(
e_no int(11) primary key not null unique,
e_name varchar(50) not null,
e_gender char(2),
dept_no int(11) not null,
e_job varchar(50) not null,
e_salary int(11) not null,
hireDate date not null,
constraint fk_employee foreign key(dept_no) references dept(d_no)
);