我在oracle 中有两个用户,A用户下面有一个表a, B用户下面有一个表b,
我能否在a表上建立触发器,当a表更新时,触发b表做更新?
如果可以的话,应该怎么做?请教!
我能否在a表上建立触发器,当a表更新时,触发b表做更新?
如果可以的话,应该怎么做?请教!
解决方案 »
- error ocurred during capture: ora-01483:DATA 或NUMBER 赋值变量的长度无效
- oracle中 用拼sql语句实现插入数据后返回当前自增长ID号,出现怪问题,求高手解决
- 一个技术难题~~~~~~~~
- 存储过程和游标的问题
- 简单问题!
- oracle9i安装以后需要什么配置吗?谢谢~
- Oracle Client 怎样通过SqlPlus 连接到Server.在client的net manager里测试通过
- 在线等待,一个大数据库检索问题
- 关于tord。请大家帮忙。等答案
- 在TRIGGER中定义一个变量。类型和某个表的字段保持一致。怎么定义?
- select数据into时出现ORA-01403数据不存在,但又不想事先select count(*),因为表里数据太多,这样会影响效率,请高手指教
- oracle动态给表命名问题
AFTER UPDATE ON A.a
for each row
declare
-- local variables here
begin
IF UPDATING THEN
UPDATE b.b SET column_b=:NEW.coumn_b WHERE column_a=:OLD.a;
END IF;
end testT;
create or replace trigger CAMPOXU_CHANGED after insert or update or delete
on zladmin.campoxu for each row
declare
integrity_error exception;
errno integer;
errmsg char(200);
/*idx varchar2(50);*/begin
if inserting then
insert into kfadmin.test(kfadmin.test.test2,kfadmin.test.test3) values(:NEW.CID,:NEW.CNAME);
elsif updating then
update kfadmin.test set kfadmin.test.test2=:NEW.CID,kfadmin.test.test3=:NEW.CNAME where kfadmin.test.test2=:OLD.CID;
elsif deleting then
delete from kfadmin.test where kfadmin.test.test2=:OLD.CID;end if;
exception
when integrity_error then
raise_application_error(errno, errmsg);
end;
结果说:表或者视图不存在!