藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 數 據 庫


    

藍森林 http://www.lslnet.com 2006年8月26日 15:18


請高手指教!!

解雇一個員工,若該員工是最後一個員工,裁減該部門

create or replace procedure remove_and_fire_emploee
is
v_emno  emploee.emno%type;
no_of_emploees number;
begin
select count(*)
into no_of_emploees
from emploee,emploee others
where emploee.emno=v_emno
and emploee.deptno=others.deptno;
if no_of_emploees=0 then
raise_application_error (-20200,'emploee does not exist.');
else if no_of_emploees=1 then
fire_emploee
remove_dept
else /*no_of_emploees>;1*/
fire_emploee
end if;
end if;
end remove_and_fire_emploee;

錯誤提示:
PLS-00103: Encountered the symbol "REMOVE_DEPT" when expecting
one of the following:
:= . ( @ % ;
哪位大哥大姐幫幫忙啊!!謝謝!!



Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com