oracle的分号和斜杠/ - Oracle / 基础和管理
引用 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. 我的理解是,对一些block,比如declare, begin end ,create procedure之类的,'/'是必须的,用来run 而一些简单statement,‘/ '会导致运行两次 问题是,直接用一个'/'就会运行两次,还是在分号之后还在下行跟着 / 才会执行两次? 另外,如果要避免重复执行的话,分号和斜杠是不是二选一就可以了,一般选哪个有啥习惯?引用 1、放在分号后面的 / 会导致两次;sqlplus认为输入“;”表示一个语句结束 2、分号 谢谢。 再问一下 像create procedure,到最后也应该有个分号结束,然后再跟一个斜杠 对这种block的这样没问题吗? 如果是语句的话,;表示结束并且运行 如果是程序块或者pl块,;表示结束不允许,必须/表示运行 楼上的已经说的很清楚了! ;是执行语句必须的 /是执行语句块必须的
相关问答:
各位大哥,帮个忙。 下个Oracle for vista 版本的安装试试 10G和11G的 http://www.oracle.com/technology/software/products/database/index.html ------------------------------------------- ......
在系统运行的时候总是有一块磁盘始终闪红灯,进入系统后 #topas查看总是有一块磁盘%BUSY为90%以上, 数据库版本:oracle 9.2.0.7 数据文件挂载的节点:/oradata/pcs/ 逻辑卷号lv04 #lslv -l lv04
......
我的处理是这样的: 我有一个很大的数据集合,处于性能方面的考虑需要使用临时表过渡,并且使用分页的方式向临时表中插入数据,数据使用完毕后,删除临时表的数据。 出现的现象:当Oracle重新启动后,第一页插入的 ......
--建立一个包以定义一个游标 create or replace package PK_test as type cur_test is ref cursor; end PK_test; --建立一个过程,通过输入JOBID,返回一个表记录(游标)! create or replace ......
select distinct '1' t1,'2' t2,'3' t3,'4' t4 from table 查出来的结果为 1,2,3,4 我想得以下这样的效果 1 2 3 4 请问一下有什么办法可以解决??? 没有好的方法,用union,一条条记录拼接 SQL code: wi ......