建立只读简单视图
SQL> create table test(id int,name varchar(20));
Table created.
SQL> insert into test(1,'anbob.com');
insert into test(1,'anbob.com')
*
ERROR at line 1:
ORA-00928: missing SELECT keyword
SQL> insert into test values(1,'anbob.com');
1 row created.
SQL> insert into test values(2,'weejar.com');
1 row created.
SQL> commit;
Commit complete.
SQL> select * from test;
ID NAME
---------- ----------------------------------------
1 anbob.com
2 weejar.com
SQL> create view v_t
2 is
3 select id,name from test;
is
*
ERROR at line 2:
ORA-00905: missing keyword
SQL> create view v_t
2 as
3 select id,name from test;
View created.
SQL> insert into v_t values(3,'a');
1 row created.
SQL> commit;
Commit complete.
SQL> create view v_t_read
2 as
3 select id,name from test
4 with read only;
View created.
SQL> insert into v_t_read values(3,'a');
insert into v_t_read values(3,'a')
*
ERROR at line 1:
ORA-01733: virtual column not allowed here
「喜欢文章,快来给作者赞赏墨值吧」 赞赏
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
请登录后发表评论