Oracle SQL in clause
In a Oracle SQL-statement you can use the IN-clause.
where column in ('1','2','3')
or column in (select val
In Oracle 10g the number of static values in the IN-clause is limited to 1000.
If you need to use more than 1000 values for the where condition, you can populate a temp
table with the values and use a select on that table in the IN-clause.
Most of the time an IN-clause can also be rewritten to an EXISTS-clause.
Sometimes the performance of the 2 is very different.
from table a
where EXISTS(select ''
from table2 b
where b.kol = a.kol);