摘要: oracle触发器用于操作过一个表要对另一个表产生影响,这是可以用触发器比如记录谁更新过这个记录等---------------------------------------Create Or Replace Trigger huiTrig After Insert Or Delete Or Update On dept For Each RowBegin If Inserting Then Insert Into emp Values (999,'insert', 0); Elsif Updating Then Insert Into emp Values (999, 阅读全文
posted @ 2012-05-10 10:42 Grace Dream 阅读(249) 评论(0) 推荐(0) 编辑
摘要: create or replace function huifunction(i_user_id in number) return varchar2 is m_result varchar2(40);begin begin ---勿忘 select deptname into m_result from dept where id=i_user_id; exception when others then m_result:='出错'; end; return (m_result);end huifunction; ----另一种实现方法create or replace f 阅读全文
posted @ 2012-05-10 09:53 Grace Dream 阅读(376) 评论(0) 推荐(0) 编辑