【发布时间】:2019-11-29 12:12:54
【问题描述】:
我试图在我的 SQL 查询中使用两个 where 语句,一个查询用于过滤公司名称,另一个用于子查询。但它总是给我错误
我的代码:
select *
from products c
where c.company = "Apple"
and
where c.id in (select bi.component_id
from category ct
join items bi
on ct.id = bi.id
where ct.id in (1,2,3)
)
我只想在 Apple 上过滤,但在运行我的脚本的那一刻它给了我一个错误
【问题讨论】:
-
你不能在这样的地方使用
-
那我需要怎么使用呢?
标签: mysql subquery where-clause