To make a long story short, I started getting ORA-00001 primary key violations and I tracked down the issue to the fact that some of my INSERT INTO
statements were
/* This is a comment */
Just make sure you have a space after /*
,
So it is treated as a single/multi line comment. And not mean to execute the last stored PL/SQL or SQL
To put it in detail.
What ever SQL*Plus interprets after /
is ignored and it blindly pushes it's cached block into the server. Except for /*
followed by a new line
or space
.
SQL> SELECT * FROM DUAL;
D
-
X
SQL> /*t*/
D
-
X
SQL> /*
SQL> */
SQL> /
D
-
X
SQL> /*s
D
-
X
From Document:
You must enter a space after the slash-asterisk(/*) beginning a comment.