提交 3a3bb594 编写于 作者: M Mars Liu

fixed a typo

上级 3dd3d652
......@@ -24,12 +24,12 @@ create table employee(
## 答案
```sql
select id, name, dept
select id, name, dept_id
from employee as o
where not exists(
select *
from employee as i
where o.dept = i.dept and post='assistant');
where o.dept_id = i.dept_id and post='assistant');
```
## 选项
......@@ -37,17 +37,17 @@ where not exists(
### A
```sql
select id, name, dept
select id, name, dept_id
from employee as o
where exists(
select *
from employee as i
where o.dept = i.dept and post='assistant');
where o.dept_id = i.dept_id and post='assistant');
```
### B
```sql
select id, name, dept
select id, name, dept_id
from employee as o
where 'assistant' != exists(
select post
......@@ -57,10 +57,10 @@ where 'assistant' != exists(
### C
```sql
select id, name, dept
select id, name, dept_id
from employee as o
where 'assistant' = not exists(
select post
from employee as i
where o.dept = i.dept);
where o.dept_id = i.dept_id);
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册