If you have a string table type available, then the following script might do what you want
create table big_table
(
cod varchar2(4000)
);
create table big_table2
(
cod varchar2(4000)
);
insert into big_table (cod) values ('12345');
insert into big_table (cod) values ('12346');
insert into big_table (cod) values ('12347');
insert into big_table (cod) values ('12345');
insert into big_table (cod) values ('12348');
insert into big_table (cod) values ('12349');
--Example usage of the custom defined type stringarray
SELECT column_value from table(stringarray('12345','12348'));
WITH temp as (SELECT column_value from table(stringarray('12345','12348')))
SELECT * FROM big_table WHERE cod IN (SELECT column_value from temp)
UNION ALL
SELECT * FROM big_table2 WHERE cod IN (SELECT column_value from temp);
drop table big_table;
drop table big_table2;
You can create the stringarray type like this
CREATE OR REPLACE TYPE STRINGARRAY as table of varchar2(30)
I hope that answers your question.
temp?