CREATE OR REPLACE TRIGGER Test
AFTER INSERT ON t1 FOR EACH ROW
BEGIN
insert into t2 (id,t2c1,t2c2)
select t1.id,t1.t1c1,t3.t3c1 from t1,t3
where t1.id=t3.id and t1.id = :New.id;
END;
AFTER INSERT ON t1 FOR EACH ROW
BEGIN
insert into t2 (id,t2c1,t2c2)
select t1.id,t1.t1c1,t3.t3c1 from t1,t3
where t1.id=t3.id and t1.id = :New.id;
END;
解决方案 »
- OracleDBA职业素养一二三 .
- IN 的执行效率太低了,怎么提高?
- 建表空间不建在oracle硬盘目录下可以吗
- 求救!!oracle解锁问题
- 请高手们帮我看看刚写的触发器 ,问题出在哪里?
- 请问大侠如何清空ORACLE数据库里面的数据??
- Oracle学习
- 求按月查询 plsql语句
- ORACLE更新数据时报错:Attempt to get a connection from a closed connection pool
- 不小心将数据库某个表数据delete 调了。怎么能回复?
- 急呀!!!!有关oracleservice启动的问题
- 急,特急 ,高手请帮我,关于oracle字符集的问题
CREATE OR REPLACE TRIGGER Test
AFTER INSERT ON t1 FOR EACH ROW
BEGIN
insert into t2 (id,t2c1,t2c2)
select t1.id,t1.t1c1,t3.t3c1 from t1,t3
where t1.id=t3.id and t1.id = :New.id AND
(t1.t1c1 IS NOT NULL AND T3.t3c1 IS NOT NULL);
END;
after insert on t1
for each row
begin
insert into t2(id,t2cl,t2c2)
select t1.id,t1.t1cl,t3.t3cl from t1,t3
where t1.id=:new.id and t1.id=t3.id and t1.t1cl is not null and t3.t3cl is not null
end;
/
before insert on a
for each row
declare
str varchar2(50);
begin
select t3c1 into str from t3 where id=:new.id;
if :new.t1c1 is not null and str is not null then
insert into t2 select :new.id,:new.t1c1,t3c1 from t3 where id=:new.id;
end if;
end;
/
天星的有编译错误,
最后一个把表名变为t1 就对了,谢谢大家还顺便问:DBA Studio中日期字段的显示格式是不能改变的。是真的吗?