【正文】
e gid=p_gid。 exception when no_data_found then (39。there is not such a goods!39。)。 end show_goodsinfo。 function ret_gdt( p_gid %TYPE) return %TYPE as v_gdt %TYPE。 begin select gdt into v_gdt from emp where gid=p_gid。 return v_gdt。 exception when no_data_found then (39。the gid is invalid!39。 )。 end ret_gdt。 end pkg_googs。 創(chuàng)建一個(gè)觸發(fā)器,禁止陌生人對(duì)該表進(jìn)行操作 create or replace trigger trg_goods_stranger before insert or update or delete on goods begin if to_char(sysdate,39。DY39。,39。nls_date_language=american39。)in(39。stranger39。) then raise_application error(,39。can39。39。t operate in stranger.39。)。 end if。 end trg_goods_stranger。