I'm trying to increment a sequence by the grater value from an id column (numeric type but not int). For this I've tried to declare an int variable and selecting into it the max value from the table like this:
declare
last_id int;
begin
select max(id) into last_id from my_table;
alter sequence my_table_seq increment by last_id;
end;
However, I'm getting this error
ORA-06550: line 2, column 19:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
:= . ( @ % ; not null range default character
I'm using Oracle 11g. Here's a screenshot

EXECUTE IMMEDIATEthat. My guess is that you're trying to do something like thereset_sequencesprocedure here does asktom.oracle.com/pls/asktom/…execute immediatebut I'm getting the same error