Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Make table read-only
"Ralf Zwanziger" <ralf_on_duty_at_gmx.de> a écrit dans le message de
news:7n57n0t979rtkrvpcploqj7u37fqk9k6gu_at_4ax.com...
> Is ist possible to make an oracle table read-only?
> (without moving it to a read-only tablespace).
> I haven't found any command like "alter table xxx read only" in the
> docs.
>
> Bye,
> Ralf
>
You can add a trigger before insert, update or delete that raise an error, something like:
create or replace my_trigger
before insert or update or delete on my_table
begin
raise_application_error (-20001,'Updating the table is not allowed');
end;
/
This will work for all including the owner of the table.
-- Regards Michel CadotReceived on Mon Oct 18 2004 - 13:23:21 CDT