Based on this example, I created this code:
DECLARE
new_employee_id INTEGER;
BEGIN
SELECT MAX(EMP_ID) + 1 INTO new_employee_id FROM EMPLOYEE;
EXECUTE IMMEDIATE 'CREATE OR REPLACE SEQUENCE primary_key_seq START WITH ' || new_employee_id || ' INCREMENT BY 1';
END;
/
OBS: perhaps using a sequence to auto increment the primary key of a table doesn't make much sense, but this is a school exercise and that's what we're supposed to do, so please disregard that aspect.
This is the error I have: ERROR AT LINE 1 ORA-00922: missing or invalid option ORA-06512: at line 5
What could be wrong?