Oracle 11g starts with the ability to set a table as read-only, which prevents modifications to certain tables and provides a certain degree of security.
Settings are as follows:
-- Set table as read-only permission (locking) ALTER TABLE READ only ; -- set Read and Write permissions for a table (unlock) ALTER TABLE READ WRITE;
When the table needs to be updated, adding and deleting records, you can reset the read and write permissions, after the table modification operation, set to read-only properties again.
Expansion: In some specific situations, it may be necessary to increase the record of a table, can not delete, how can this be achieved?
One way to refer to this table is to add a trigger, when the table is updated, deleted, and so on, the trigger throws an exception, insert, do not trigger an exception.
Oracle sets a table as read-only