Simple table:
CREATE TABLE Users (
PersonID int,
Name varchar(255),
Salary int
);
I have to write a cursor that will be used in a procedure. Cursor is supposed to return records whose Name field belongs to the array.
CREATE OR REPLACE TYPE namesArray AS TABLE OF int;
/
CURSOR luckyPeople(names IN namesArray) IS
select PersonID from Users
where Name IN(namesArray); //how this can be solved?
How can I use the array in the select clause?
thanks