oracle 存储过程和函数例子
dbms_output.put_line(stu_name|| course_name);
stu_name varchar2(100);
begin
end;
begin
---关于游标 for,case 的例子2
dbms_output.put_line(c_n);
end loop;
end loop;
return number
begin
case
begin
then
end;
dbms_output.put_line('feng la feng la ');
is
dbms_output.put_line('Stu_name = '||temp.stu_name);
dbms_output.put_line(temp );
error EXCEPTION;
sum1 number := 0;
as
end;
open var_cur;
end loop;
is
return number;
end;
else
---关于异常处理的例子
c_n varchar2(100);
end;
then
dbms_output.put_line(sum1 );
create or replace procedure loop_cur
when 1 then
Dbms_Output.put_line('c_n' || c_n);
course_name varchar2(100);
when 3 then
dbms_output.put_line('haha4');
begin
---关于异常处理的例子2
end loop;
then
dbms_output.put_line('try');
end;
create or replace procedure peace_insert ( c_n in varchar2)
end loop;
insert into course (course_name) values (c_n);
close var_cur;
end;
dbms_output.put_line('haha3');
create or replace procedure peace_loop
if c_n = 'OK'
is
create or replace procedure peace_if
exception
begin
procedure test2 (in2 in varchar2);
dbms_output.put_line('haha3');
create or replace package peace_pkg
procedure test2 (in2 in varchar2)
dbms_output.put_line('haha1');
for temp in var_c loop
is
commit;
end if;
exit when temp >= 10 ;
begin
elsif c_n = 'NG' then
begin
create or replace procedure peace_for
function test1(in1 in varchar2)
when temp.vol=3 then
for temp in var_c loop
dbms_output.put_line('qita');
select course_name into c_n from grade where stu_name = in1;
dbms_output.put_line('haha4');
end;
function test1(in1 in varchar2)
end peace_pkg; exit when var_cur%notfound;
dbms_output.put_line('haha2');
end case ;
fetch var_cur into stu_name,course_name;
begin
---关于包的例子 定义包体
cursor var_c is select * from test_case;
when temp.vol=2 then
loop
create or replace procedure peace_case2
elsif temp.course_name = 'DB' then
sum1 := sum1+temp;
end;
dbms_output.put_line('more');
temp := temp +1;
raise error;
exception
as
sum1 number :=0;
end loop;
temp := temp||to_char(i) || ' * ' ||to_char(j) ||' = ' ||to_char(sum1) ||' ';
dbms_output.put_line('haha1');
---关于 loop循环的例子
temp number :=0 ;
---关于游标 for,case 的例子1
begin
create or replace package body peace_pkg
is
is
for i in 1..9 loop
cursor var_c is select * from test_case;
temp := '';
when 4 then
end loop;
---关于for 循环的例子
---关于包的例子 定义包
when error then
else
when temp.vol=4 then
dbms_output.put_line('qita');
rollback;
when TOO_MANY_ROWS
end if;
create or replace procedure peace_exp(in1 in varchar2)
temp := 0;
if temp.course_name = 'OS' then
关于 游标 if,for 的例子
for j in 1 .. i
create or replace procedure peace_case1
dbms_output.put_line('haha2');
作者:peace.zhao
dbms_output.put_line(in2);
else
end peace_pkg;
cursor var_cur is select * from grade ;
return temp;
when 2 then
end;
temp varchar2(500);
sum1 := i * j;
when temp.vol=1 then
for temp in var_c loop
dbms_output.put_line('DB');
is
when no_data_found
loop
case temp.vol
is
cursor var_c is select * from grade;
loop
is
else
Dbms_Output.put_line('ERRO');
temp number;
insert into course (course_name) values (c_n);
---关于游标和loop循环的例子
as
相关热词: oracle
本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!
本文地址: https://v30.fanwenzhu.com/sql/oracle/4205.shtml
相关文章
热门TAG
win10 ecshop 主机 阿里云 解决 配置 C# C++ 解析 SQL语句 命令 Go语言 方法 CSS3 HTML5 CSS win7 MSSQL 服务器配置 IIS7.5 IIS7 IIS6 IIS CentOS 7 Linux oracle数据库 oracle phpcms discuz discuz教程最新文章
-
是因为scan的IP问题补占用
时间:2021-01-20
-
还你一个干净的model 2、功
时间:2021-01-20
-
既然 ROWNUM 列并不是真实存
时间:2021-01-20
-
Real Application Clusters
时间:2021-01-20
-
在tools-preferences-connection(
时间:2021-01-20
-
Windows Sever 2012下Oracle 12c安
时间:2021-01-10
-
Oracle安装监听器错误的解
时间:2021-01-07
-
oracle远程连接服务器数据
时间:2021-01-07
热门文章
-
Oracle存储过程编程详解
时间:2020-12-07
-
Azure Queue Storage 基本用法 Azure Storage 之
时间:2020-12-26
-
win10下oracle 11g安装图文教程
时间:2020-12-25
-
oracle 数据库学习 基本结构介绍
时间:2020-12-13
-
Azure File Storage 基本用法 Azure Storage 之 F
时间:2020-12-26
-
windows使用sqlpus连接oracle 数据库的教程图
时间:2020-12-25
-
Window下Oracle Database 11g 发行版2安装教程
时间:2020-12-29
-
Oracle解锁的方式介绍
时间:2020-12-14
-
Oracle 12c Study之Installer Oracle
时间:2021-01-06
-
linux下oracle设置开机自启动实现方法
时间:2020-12-13
