oracle的分号和斜杠/
[Quote=]
1. 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.
[/Quote]
我的理解是,对一些block,比如declare, begin end ,create procedure之类的,'/'是必须的,用来run
而一些简单statement,‘/ '会导致运行两次
问题是,直接用一个'/'就会运行两次,还是在分号之后还在下行跟着 / 才会执行两次?
另外,如果要避免重复执行的话,分号和斜杠是不是二选一就可以了,一般选哪个有啥习惯?
1. 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.
[/Quote]
我的理解是,对一些block,比如declare, begin end ,create procedure之类的,'/'是必须的,用来run
而一些简单statement,‘/ '会导致运行两次
问题是,直接用一个'/'就会运行两次,还是在分号之后还在下行跟着 / 才会执行两次?
另外,如果要避免重复执行的话,分号和斜杠是不是二选一就可以了,一般选哪个有啥习惯?
...全文
相关推荐
oracle的sqlplus学习笔记.docx
SQL 语句以分号 (`;`) 或反斜杠 (`/`) 结束,PL/SQL 块以反斜杠 (`/`) 结束。使用连字符可以使用连字符 (`-`) 作为语句行的继续字符。
oracle的sqlplus学习笔记分享.pdf
**执行操作**:SQL语句通常以分号`(`或反斜杠`/`结束。PL/SQL块也以反斜杠结束。连续的SQL语句行可通过连字符`-`表示,如`select 200 - 100 from dual;`。
浅谈MySQL模糊查询中通配符的转义
例如:```sqlSELECT percent FROM score WHERE percent LIKE '%0/%' ESCAPE '/';```在这里,我们指定了斜杠(/)作为转义字符,所以“/%
Oracle-SQLPLUS命令.ppt
执行SQL语句时,可以使用分号或斜杠(/)作为执行标志。如果想清除整个缓冲区,可以使用`CLEAR BUFFER`命令。
Oracle开发应用(PLSQL)基础大全及实例讲解.pdf
)); ``` - PL/SQL块结束符:PL/SQL块以斜杠`/`结尾,如声明、过程、函数等: ``` declare v1 varchar2(10); begin v1 := 'test'; dbms_output.put_line


基础和管理
