oracle建包,函数demo
create table BOOK
(BOOK_ID NUMBER(10),BOOK_NAME VARCHAR2(10)
);create or replace package chen_pack
isfunction f__getBOOK_NAME_number(in_status in varchar2) return number;
end;create or replace package body chen_pack
asfunction f__getBOOK_NAME_number(in_status in varchar2)return numberasoutnum number;beginselect count(1) into outnum from test1.BOOK g where g.BOOK_NAME = in_status;return outnum;end f__getBOOK_NAME_number;end;
posted @ 2018-08-13 14:17 酸奶加绿茶 阅读( ...) 评论( ...) 编辑 收藏