下面只定义了基本结构,其他的如索引,字符集等要酌情加上。
create table departments (
id int primary key,
name varchar(50) not null,
parent_id int
)
create table employee (
id int primary key,
department_id int not null,
name varchar(50) not null,
)
下面是一些伪代码
department = select * from departments where name = [department_name]
departments = select * from departments where parent_id = department.id
select * from employee where department_id in [departments.id + department.id]
安装无法启动mysql,windows mysql 错误日志,mysql配置出现2003错误,mysql 用于备份的用户,密令打开mysql,mysql 查看是否自动提交数据