In pl/sql i can use in
keyword with a set of strings:
select * from languages where language_tag in ('en','fr','es')
how can i define the set of ('en','fr','es')
in DECLARE
section of script and use it over again?
--edit:
A very nasty approach (which is my current approach!) is to define items as csv strings in declare section and use execute_immediate
:
DECLARE
v_csv_tags VARCHAR2(123) :='''en'',''es''';
BEGIN
execute immediate 'delete from config_supports_language where language_code not in ('||v_csv_tags||')';
execute immediate 'delete from languages where language_code not in ('||v_csv_tags||')';
END;
/
EXIT;