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

fixed a typo

上级 3dd3d652
...@@ -24,12 +24,12 @@ create table employee( ...@@ -24,12 +24,12 @@ create table employee(
## 答案 ## 答案
```sql ```sql
select id, name, dept select id, name, dept_id
from employee as o from employee as o
where not exists( where not exists(
select * select *
from employee as i 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( ...@@ -37,17 +37,17 @@ where not exists(
### A ### A
```sql ```sql
select id, name, dept select id, name, dept_id
from employee as o from employee as o
where exists( where exists(
select * select *
from employee as i from employee as i
where o.dept = i.dept and post='assistant'); where o.dept_id = i.dept_id and post='assistant');
``` ```
### B ### B
```sql ```sql
select id, name, dept select id, name, dept_id
from employee as o from employee as o
where 'assistant' != exists( where 'assistant' != exists(
select post select post
...@@ -57,10 +57,10 @@ where 'assistant' != exists( ...@@ -57,10 +57,10 @@ where 'assistant' != exists(
### C ### C
```sql ```sql
select id, name, dept select id, name, dept_id
from employee as o from employee as o
where 'assistant' = not exists( where 'assistant' = not exists(
select post select post
from employee as i 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.
先完成此消息的编辑!
想要评论请 注册