How to run query with empty parameter (Oracle)

INSERT INTO SOMETABLE (VAR1, VAR2, DATE, SYSTEMVAR)
VALUES (ONE, TWO, SYSDATE+1, :PSYSTEMVAR)
RETURNING ISN INTO :PSOMEKEY;
Params PSYSTEMVAR is null, PSOMEKEY is null, PSYSTEMVAR input params, PSOMEKEY output params
SOMETABLE have rows like:

somekey(NUMBER, NOT NULLABLE, DEFAULT NULL), var1(VARCHAR2(255), NOT NULLABLE, DEFAULT NULL), var2(VARCHAR2(255), NULLABLE, DEFAULT NULL), date (DATE, NULLABLE, DEFAULT NULL), systemvar (NUMBER, NULLABLE, DEFAULT NULL)

ORA-06550: Line 3, Column 22:
PLS-00308: this construct is invalid as an initial value
ORA-06550: Line 3, Column 26:
PL/SQL: ORA-00904: : invalid identifier
ORA-06550: Line 1, Column 3:
PL/SQL: SQL Statement ignored

Same query in oracle sql developer with null params properly work.

Please sign in to leave a comment.