ORA-01779: cannot modify a column which maps to a non key-preserved table

短命女 2022-09-12 02:56 111阅读 0赞
  1. create or replace view testView
  2. as
  3. select username, account_status, user_id from dba_users where username like 'S%'
  4. with check option;

在这里插入图片描述

  1. update testView
  2. set username = 'SCHEMA'
  3. where user_id = '92';

在这里插入图片描述

  1. select * from testview;
  2. alter view testview modify user_id unique;

在这里插入图片描述

  1. create unique index testview_user_id on testview (user_id);

在这里插入图片描述

发表评论

表情:
评论列表 (有 0 条评论,111人围观)

还没有评论,来说两句吧...

相关阅读