SQL> create table read_tab(id number);
Table created.
SQL> insert into read_tab values(1);
1 row created.
SQL> commit;
Commit complete.
SQL> alter table read_tab read only;
Table altered.
SQL> insert into read_tab values(2);
insert into read_tab values(2)
*
ERROR at line 1:
ORA-12081: update operation not allowed on table "SA"."READ_TAB"
SQL> delete from read_tab where id = 1;
delete from read_tab where id = 1
*
ERROR at line 1:
ORA-12081: update operation not allowed on table "SA"."READ_TAB"
SQL> c /1/2
1* delete from read_tab where id = 2
SQL> /
delete from read_tab where id = 2
*
ERROR at line 1:
ORA-12081: update operation not allowed on table "SA"."READ_TAB"
SQL> update read_tab set id = 2;
update read_tab set id = 2
*
ERROR at line 1:
ORA-12081: update operation not allowed on table "SA"."READ_TAB"
SQL> truncate table read_tab;
truncate table read_tab
*
ERROR at line 1:
ORA-12081: update operation not allowed on table "SA"."READ_TAB"
SQL> alter table read_tab add description varchar2(50);
alter table read_tab add description varchar2(50)
*
ERROR at line 1:
ORA-12081: update operation not allowed on table "SA"."READ_TAB"
SQL> drop table read_tab;
Table dropped.
SQL> create table read_tab(id number);
Table created.
SQL> insert into read_tab values(1);
1 row created.
SQL> commit;
Commit complete.
SQL> alter table read_tab read only;
Table altered.
SQL> alter table read_tab read write;
Table altered.
SQL> delete from read_tab;
1 row deleted.
SQL> commit;
Commit complete.
阅读(1534) | 评论(0) | 转发(0) |