Chinaunix首页 | 论坛 | 博客
  • 博客访问: 551134
  • 博文数量: 154
  • 博客积分: 4055
  • 博客等级: 上校
  • 技术积分: 1381
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-01 14:26
文章分类

全部博文(154)

文章存档

2014年(2)

2013年(2)

2011年(2)

2010年(11)

2009年(9)

2008年(35)

2007年(22)

2006年(71)

我的朋友

分类: Oracle

2007-11-08 22:22:27

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) |
给主人留下些什么吧!~~