0
我试图取决于在现场从我的表1中更新的值我的表2更新领域,甲骨文更新触发成功与编译错误
create or replace trigger update_value
AFTER update of field_1 on table_1
for each row
begin
if(:New.field_1 = 'y') then
update table_2
set field_2 = 'updated'
from table_1
where table_1.id = table_2.id
end if;
end;
哪个RDBMS是这样的?触发器是**高度**特定于供应商的 - 请添加一个标签以指定您是使用'mysql','postgresql','sql-server','oracle'还是'db2' - 或者其他的东西。 –
okey thanks让我知道 – thomaSmith
在运行该命令之后执行'show errors',或者查询'user_errors',看看实际的底层错误是什么。 'table_1'应该做什么? –