Why do C-style comments make insert statement run twice?

余生长醉 提交于 2019-12-02 05:10:59
/* 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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!