Oracle SQL command slash

We know that there is "commit" in oracle to submit all data in the session and used very common.

But there is "/" in sql command line that is special and do not use it in wrong way.

"Adding a slash to the end of each statement was a bad choice because sqlplus treats slash as a buffer flush.

  • For procedure/triggers/functions it is a must: because content of if is stored in the buffer and is not executed.
  • However, for all other statements it means executing the same statement twice because such statement is executed immediately and put into buffer and following slash just re-executes the same statement."

-- So if one command exceuted before and still in buffer, after several steps you do not need execute any more. Then do no not use it to make mistake.

原文地址:https://www.cnblogs.com/yjyyjy/p/11557598.html