sqlplus: how to execute a query spanning multiple lines
I am using Oracle 19c. I can get the following to work: variable max_id number; exec select 41 into :max_id from dual; begin dbms_output.put_line(:max_id); dbms_output.put_line(:max_id+1); end; But splitting the select across multiple lines produces an invalid SQL statement error at the new line: variable max_id number; exec select 41 into :max_id from dual; -- invalid