【发布时间】:2021-12-16 19:19:40
【问题描述】:
我需要在 oracle 中使用某些表来限制对 DDL 的访问,禁止删除该表。我怎么能做到这一点?我只是可以为数据库和架构创建 DDL 触发器
create table my_table(
id int primary key not null,
first_val int,
second_val int
);
create trigger delete_disabling_trigger
before drop on database
begin
if --some condition
dbms_output.put_line('delete_disabling_trigger');
RAISE_APPLICATION_ERROR(-175,'Cant delete this table');
end if;
end;
【问题讨论】:
标签: oracle