我用vendor_maste 表和 t2表  创建了一个视图nview。这个视图中具有键保留表,其中更新语句 
update nview set t2_name='张三' where t2_name='李四' 可以更新。也就是说我通过
select * from user_updatable_columns where table_name='nview'可以查出记录来吧?
但是我执行这个查询语句后,显示 “未选定行”,这是怎么回事呀?

解决方案 »

  1.   

    是不是你建视图与查询是用不同的schema?
      

  2.   

    我是用system 登录sql*plus的。
    我创建视图过程是这样的。
    第一步:先创建表 stu1:
    create table stu1(stu_id varchar2(10) primary key,stu_course varchar2(20),stu_score number(5));
    第二步,创建表 info:
     create table info(stu_id varchar2(10) primary key,stu_name varchar2(20),stu_age number(4));
    第三步,给表赋值。
    第四步,创建视图:
    create or replace view view_stu as select vm.stu_id,stu_name,stu_course,stu_score from 
    stu1 vm,info where vm.stu_id=info.stu_id;
    第五步:通过select * from user_updatable columns where table_name='view_stu' 来查看视图view_stu可以更新的列。但是为什么查不出来。
    我创建的视图view_stu 明明有可以更新的列。
      

  3.   

    大小写不区分吧?我不加where条件就能查出1000多条记录。