地市分站
用户名
密  码
您现在的位置是:树人网首页 / 计算机等级考试 / oracle认证 / 文章浏览
能将Oracle数据库中的表设置成只读吗?
文章来源:来源网络 发表时间:2008-06-21 点击次数
一直以来总有人问,能够将Oracle数据库中的表设置成只读吗?在Oracle11g之前回答是,不能。HJR甚至写过一篇完整的文章来阐述这个问题。Oracle 11g终于带来了这个新特性,设置表为Readonly,简单的一个命令而已。


  SQL> CREATE TABLE "KAMUS"."T1" ( "N" NUMBER);
  Table created
  Executed in 0.047 seconds
  SQL> alter table t1 read only;
  Table altered
  Executed in 0.125 seconds
  SQL> insert into t1 values(1);
  insert into t1 values(1)
  ORA-12081: update operation not allowed on table "KAMUS"."T1"
  SQL> alter table t1 read write;
  Table altered
  Executed in 0.015 seconds
  SQL> insert into t1 values(1);
  1 row inserted
  Executed in 0 seconds



第 页

责任编辑:qwer19871212

相关文章
公告栏

“蓝焰杯”第二届河南教育十大新闻人物火热评选中!!

点击参加评选,为你心目中的新闻人物投上一票>>>>
频道内容精选
[计算机考试]程序员必考的知识点
论坛/博客精选