O
O
Oleg Seledets2019-01-06 19:02:49
SQL
Oleg Seledets, 2019-01-06 19:02:49

How to organize a Substitution in an SQL query for an unknown set of data?

Hello, there is a tableWidget in it is always a different number of rows, but one column. Is there any way to substitute all the rows from this table into the SQL query:

SELECT *
FROM Universities
WHERE Location IN ('Novosibirsk', 'Perm')

In brackets instead of Novosibirsk and Perm?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2019-01-06
@oleja1ee7

SELECT *
FROM Universities
WHERE Location IN (select location from tableWidget)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question