Useful shortcuts for vi editor

Friday 13 January 2017

How to change table read-write mode?

Set read only mode:
SQL>
ALTER TABLE HR.EMPLOYEES READ ONLY;

Set read/write mode:

SQL>
ALTER TABLE HR.EMPLOYEES READ WRITE;

Check table status:
SQL>
SELECT OWNER, TABLE_NAME, READ_ONLY FROM DBA_TABLES WHERE TABLE_NAME = 'EMPLOYEES';