sqlmongodbstudio3t

Studio 3T - SQL - IN expression


Is it possible to use SQL IN expression in Studio 3T? I can't seem to get this working:

select * from employees
where job IN
(select job
from job where redundant=1
group by job)

I get an error:

Unable to execute SQL statement at cursor

expected expression list (alternatives not supported)


Solution

  • It is possible to use 'in' but with exact values only https://studio3t.com/knowledge-base/articles/sql-query/#in

    You are trying to use subquery, which is not supported.

    You could use inner join https://studio3t.com/knowledge-base/articles/sql-query/#supported-sql-joins, but I guess job.job is not unique, so it will result with duplicates.