Trying to create a sequence in Oracle that starts with the max value of primary key of a specific table. Why does this not work? Trying to create a sequence in Oracle that starts with the max value from a specific table. Why does this not work ?

CREATE SEQUENCE reservation_sequence
MINVALUE 0
START WITH (SELECT MAX(reservation_id)
 FROM reservation) 
INCREMENT BY 1
CACHE 20;
You cannot mix DDL with DML in this way.

Your best bet is an anonymous PL/SQL block:

BEGIN
DECLARE
seqval NUMBER;
  BEGIN
  SELECT MAX(nvl(reservation_id),0)
  INTO seqval
  FROM reservation;

  execute immediate('CREATE SEQUENCE reservation_sequence MINVALUE 0 START WITH '||seqval||' INCREMENT BY 1 CACHE 20');
  END;
END;
/


Plus, are you sure you want max() and not max()+1?