create table BOOK ( BOOK_ID NUMBER(10), BOOK_NAME VARCHAR2(10) ); create or replace package chen_pack is function f__getBOOK_NAME_number(in_status in varchar2) return number; end; create or replace package body chen_pack as function f__getBOOK_NAME_number(in_status in varchar2) return number as outnum number; begin select count(1) into outnum from test1.BOOK g where g.BOOK_NAME = in_status; return outnum; end f__getBOOK_NAME_number; end;