Friday, January 18, 2008

How to set a table in read-only mode ?

ALTER TABLE emp
ADD CONSTRAINT read_only CHECK (1=1) DISABLE VALIDATE;

It is now, impossible to insert, update or delete anything with this table.

1 comment:

Jack said...

Great post! Thank for sharing ! This is what I was try from last 1 hour but doing very silly mistake. I just tried again after reading your post & it worked perfectly. :)
sap upgrades

Some/All/Major of the blog content is not mine and i'm not the writer of it, all rights reserved to the authors.