【发布时间】:2018-11-08 15:29:11
【问题描述】:
是否可以在 Studio 3T 中使用 SQL IN 表达式? 我似乎无法正常工作:
select * from employees
where job IN
(select job
from job where redundant=1
group by job)
我收到一个错误:
无法在光标处执行 SQL 语句
预期的表达式列表(不支持替代方案)
【问题讨论】:
是否可以在 Studio 3T 中使用 SQL IN 表达式? 我似乎无法正常工作:
select * from employees
where job IN
(select job
from job where redundant=1
group by job)
我收到一个错误:
无法在光标处执行 SQL 语句
预期的表达式列表(不支持替代方案)
【问题讨论】:
可以使用“in”,但只能使用精确值https://studio3t.com/knowledge-base/articles/sql-query/#in
您正在尝试使用不支持的子查询。
你可以使用内连接https://studio3t.com/knowledge-base/articles/sql-query/#supported-sql-joins,但我猜 job.job 不是唯一的,所以会导致重复。
【讨论】: