sách gpt4 ăn đã đi

mysql - chọn 1 - chọn 2

In lại 作者:搜寻专家 更新时间:2023-10-30 23:38:06 28 4
mua khóa gpt4 giày nike

在查询中,
select id,name,feature,marks from (....)
我想删除其 id 在另一个 select 语句中存在的那些。
从 (...) 中选择 id

我是 sql 新手。是否有直接执行此操作的语句?

câu trả lời hay nhất

几种方法。

Join:

select t1.id, t1.name, t1.feature, t1.marks 
from t1
left outer join (some select statement) t2
on t1.id = t2.id
where t2.id is null

Antijoin:

select t1.id, t1.name, t1.feature, t1.marks 
from t1
where not exists (
select id
from (some select statement) t2
where t2.id = t1.id
)

"Not In":

select t1.id, t1.name, t1.feature, t1.marks 
from t1
where t1.id not in (
select id
from (some select statement)
)

关于mysql - 选择 1 - 选择 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38864739/

28 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress