For operating on millions of records I want to put a limit of 500 but the following code gives error. Error report: ORA-06550: line 6, column 49: PLS-00103: Encountered the symbol "LIMIT" when expecting one of the following:
DECLARE
TYPE EMP_T IS TABLE OF NUMBER;
EMP_ID EMP_T;
QRY VARCHAR2(4000):='SELECT EMPLOYEE_ID FROM EMPLOYEES';
begin
execute immediate QRY bulk collect into EMP_ID LIMIT 500;
END;