You can use a nested table type for this
SQL> drop table T1 purge;
Table dropped.
SQL>
SQL> create table t1 ( userid int, cityid varchar2(10));
Table created.
SQL>
SQL> insert into t1 values (101 ,'BLR');
1 row created.
SQL> insert into t1 values (104 ,'CTC');
1 row created.
SQL> insert into t1 values (103 ,'DEL');
1 row created.
SQL> insert into t1 values (104 ,'BLR');
1 row created.
SQL> insert into t1 values (105 ,'NSK');
1 row created.
SQL> insert into t1 values (101 ,'CTC');
1 row created.
SQL> insert into t1 values (103 ,'BLR');
1 row created.
SQL>
SQL> create or replace
2 procedure list_users(p_cities sys.odcivarchar2list) is
3 begin
4 for i in (
5 select *
6 from t1
7 where cityid in ( select column_value from table(p_cities))
8 )
9 loop
10 dbms_output.put_line(i.userid||','||i.cityid);
11 end loop;
12 end;
13 /
Procedure created.
SQL>
SQL> set serverout on
SQL> exec list_users(sys.odcivarchar2list('BLR'));
103,BLR
104,BLR
101,BLR
PL/SQL procedure successfully completed.
SQL> exec list_users(sys.odcivarchar2list('BLR','DEL'));
103,BLR
104,BLR
101,BLR
103,DEL
PL/SQL procedure successfully completed.
SQL>
SQL>
SQL>