PL/SQL是没命名的存储过程,函数,触发器,PL/SQL块的语法格式如下: [declare] --声明部分,可选 begin --执行部分,必须 [exception] --异常处理部分,可选 end PL/SQL块每条语句必须用分号结束,单行注释--,多行注释/*...*/,下面是一个PL/SQL块例子 set serveroutput on declare --声明变量 a int := 1; --声明并且赋值 address varchar2(128); mobilephone va…
SQL操作符 算术操作符:+加,-减,*乘,/除 比较操作符: <,>,=,!=,<>,<=,>= 常用的判断,<>和!=相同 between $lower_val$ and $hight_val$ between .. and.. 包括两端 --查询20<=age<=21的学生数据 select * from student where age between 20 and 21 not between $lower_val$ and $hig…
如何查询硬解析问题: --捕获出需要使用绑定变量的SQL drop table t_bind_sql purge; create table t_bind_sql as select sql_text,module from v$sqlarea; alter table t_bind_sql add sql_text_wo_constants varchar2(1000); create or replace function remove_constants( p_query in varch…
十五. 构造数据类型 ● 构造数据类型概念 Structured data types 构造数据类型 结构体(structure), 联合体/共用体 (union), 枚举类型(enumeration type), 要有意识这三者是数据类型 Union is also like structure, i.e. collection of different data types which are grouped together. Each element in a structure or…
--create or replace 创建或替换,如果存在就替换,不存在就创建 create or replace procedure p is cursor c is select * from dept2 for update; begin for row_record in c loop if (row_record.deptno = 30) then update dept2 set dname = substr(dname, 0, length(dname) - 3) where c…
一.数据库性能评测关键指标 1.IOPS:每秒处理的IO请求次数,这跟磁盘硬件相关,DBA不能左右,但推荐使用SSD. 2.QPS:每秒查询次数,可以使用show status或mysqladmin extended-status命令来查看QPS值,如下所示. mysql> show global status like 'Questions';--QPS=Questions/Uptime(show status like 'Uptime')这是一个全局的平均值 +---------------…
循环对象 所谓的循环对象,包含有一个next()方法(python3中为__next__() ),这个方法的目的就是进行到下一个结果,而在结束一系列结果之后,举出StopIteration错误 当一个循环结构(例如for)调用循环对象时,它就会每次循环的时候调用next()方法,直到StopIteration出现为止,for循环接收到,就知道循环已经结束,停止调用next() 假设我们有一个文件data.txt My English is not good. My English isn't v…