I have the following case: I need to change the value of a sequence according to the max (id) of the referring table, I am trying to do something like:
ALTER SEQUENCE CFOP_SEQ INCREMENT BY (SELECT MAX(ID)+1 FROM CFOP);
But it returns me the message "Invalid number". Does anyone know how I can solve this problem?