Sometime we need to make sure that no DML operation done to a specific table, however unlike setting a tablespace as read only, there is no dedicated command or syntax to set a table as read only.
To set a table read only in Oracle database, we can use a quick and easy workaround by using a check constraint on the table while specifying disable validate.
ALTER TABLE table_name ADD CONSTRAINT table_name_read_only check(1=1) disable validate;
Trying to insert, delete or update that table would give an error code ORA-25128: No insert/update/delete on table with constraint disabled and validated error, and prevent all DML operations.