trunc (n [,m] ) 这个函数用于截取数字,如果默认省略m,则略去小数,m为正数,则截取到小数点后m位 ,m为负,截取到小数前m位。
sql游标
SQL%FOUND 用于确定sql语句执行是否成功,根据sql有作用行时,其为true,否则为false
declare
v_deptno mep.deptno%type :=&no;
begin
update emp set sal=1.1*sal
where deptno=v_deptno ;
if SQL%FOUND THEN
dbms_output.put_line('successful');
else
dbms_output.put_line('该部门不存在');
end if;
end;
SQL%ROWCOUNT 用于返回SQL语句所作用的行数。
declare
dept_record dept%type;
begin
dept_record.deptno:=5;
dept_record.dname:='管理部';
insert into dept values dept_record;
end;
declare
type emp_record_type is RECORD(
v_empno emp.empno%type,
v_ename emp.ename%type ,
v_deptno emp.deptno%type,
v_sal emp.sal%type);
emp_record emp_record_type;
begin
emp_record.v_ename:='&name';
emp_record.v_sal:=&sal;
emp_record.v_empno:=&empno;
emp_record.v_deptno:=&detno;
insert into emp values emp_record;
end;
分享到:
相关推荐
oracle函数介绍 1 著名函数之单值函数 pdf oracle函数介绍 2 非著名函数之单值函数 pdf oracle函数介绍 3 著名函数之聚合函数 pdf oracle函数介绍 4 非著名函数之聚合函数 pdf oracle函数介绍 5 分析函数简述 ...
oracle 函数大全oracle 函数大全oracle 函数大全oracle 函数大全oracle 函数大全oracle 函数大全oracle 函数大全
oracle函数大全 oracle函数大全 oracle函数大全
postgresql 兼容 oracle 函数, postgresql 兼容 oracle 函数,postgresql 兼容 oracle 函数, postgresql 兼容 oracle 函数
oracle 函数大全 参考函数 手册 速查 chm格式。。。
Oracle函数.chm
oracle函数大全,oracle函数大全,oracle函数大全,oracle函数大全,
Oracle函数.txt Oracle函数.txt Oracle函数.txt
oracle函数大全.chm oracle函数大全.chm
ORACLE函数.pdfORACLE函数ORACLE函数.pdf
ORACLE函数及其用法ORACLE函数及其用法ORACLE函数及其用法ORACLE函数及其用法ORACLE函数及其用法
oracle函数大全,介绍各自oracle函数1111111111111111111
Oracle自定义函数返回一张表。主要用于生成一张等时间间隔的表数据。
Oracle函数大全 Oracle函数大全 Oracle函数大全Oracle函数大全
Oracle函数学习资料,包含各种常用Oracle函数。
oracle函数大全.doc oracle函数大全.doc oracle函数大全.doc oracle函数大全.doc
Ora9iSQL参考手册 oracle函数大全 分类显示 Oracle函数大全 Oracle函数手册 ORACLE九阴真经 oracle知识库 SQLCodes Oracle错误代码与消息解释 SQL语言参考大全
Ora9iSQL参考手册 oracle函数大全 分类显示 Oracle函数大全 Oracle函数手册 ORACLE九阴真经 oracle知识库 SQLCodes Oracle错误代码与消息解释 SQL语言参考大全
DBA日记(第一部),oracle函数介绍(1) 著名函数之单值函数,oracle函数介绍(2) 非著名函数之单值函数,oracle函数介绍(6) 著名函数之分析函数等
oracle函数大全.pdf oracle函数大全.pdf