ALTER TABLESPACE
However, change that desire to just setting a table to READ ONLY and Oracle does not have a simple little concise statement for that. Yet what you want to accomplish can still be done fairly easily. For example:
ALTER TABLE
**Don't forget that there is a max number of charters (30) allowed in the constraint name.
Now if anyone tries to insert, update or delete from that table they will raise an ORA-25128 error.
Here an example for you to look at:
alter table PLANUSER2.UAP_TT_TOOL_TAB add constraint PLANUSER2_UAP_TT_TOOL_TAB_RO check(1=1) disable validate;
SQL> delete from PLANUSER2.UAP_TT_TOOL_TAB;
delete from PLANUSER2.UAP_TT_TOOL_TAB
*
ERROR at line 1:
ORA-25128: No insert/update/delete on table with constraint
(PLANUSER2.PLANUSER2_UAP_TT_TOOL_TAB_RO) disabled and validated
Thx
No comments:
Post a Comment