oracle plsql 打包 --打包--创建包--步骤:--1、声明(创建包头)--2、创建数据对象(创建包体) --1、create or replace packag
oracle plsql 打包
--打包
--创建包
--步骤:
--1、声明(创建包头)
--2、创建数据对象(创建包体)
--1、
create or replace package mypack
as
v_bookcount integer;
procedure p_back
(v_stuid borrow.stuid%type,v_bid borrow.bid%type);
function f_bookcount
(v_stuid student.stuid%type)
return integer;
end;
--2、
create or replace package body mypack
as
procedure p_back
(v_stuid borrow.stuid%type,v_bid borrow.bid%type)
as
begin
update borrow
set b_time=to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd')
where stuid=v_stuid and bid=v_bid;
end p_back;
function f_bookcount
(v_stuid student.stuid%type)
return integer
as
begin
select count(*) into v_bookcount from borrow where
b_time is null and stuid=v_stuid;
return v_bookcount;
exception
when others then
return 0;
end f_bookcount;
end;
相关阅读:
oracle 10g 安装后重启系统,用plsql连接报没有监听
ora-03114 plsql过程编译断开连接错误
plsql 连接 oracle简单配置
plsql批量forall操作性能提升详解
使用oracle sqldeveloper连接数据库并创建用户
oracle自带的pl/sql developer导入导出数据
在64位win7系统下安装oracle 11g和oracle sql developer客户端
,