The view needs to be compiled to reflect the changes the underlying data dictionary
SQL> create table emp as select * from scott.emp;
Table created.
SQL> create table dept as select * from scott.dept;
Table created.
SQL> create or replace view emp_vw
2 as
3 select e.empno,e.ename,d.dname
4 from emp e, dept d
5 where e.deptno = d.deptno ;
View created.
SQL>
SQL> select *
2 from user_updatable_columns
3 where table_name ='EMP_VW' ;
OWNER TABLE_NAME COLUMN_NAME UPD INS DEL
------------------------------ ------------------------------ ------------------------------ --- --- ---
MCDONAC EMP_VW EMPNO NO NO NO
MCDONAC EMP_VW ENAME NO NO NO
MCDONAC EMP_VW DNAME NO NO NO
3 rows selected.
SQL>
SQL> alter table dept add constraint dept_pk primary key(deptno);
Table altered.
SQL>
SQL> alter table emp add constraint emp_pk primary key(empno);
Table altered.
SQL>
SQL> alter table emp add constraint emp_fk foreign key(deptno) references dept;
Table altered.
SQL> select *
2 from user_updatable_columns
3 where table_name ='EMP_VW' ;
OWNER TABLE_NAME COLUMN_NAME UPD INS DEL
------------------------------ ------------------------------ ------------------------------ --- --- ---
MCDONAC EMP_VW EMPNO NO NO NO
MCDONAC EMP_VW ENAME NO NO NO
MCDONAC EMP_VW DNAME NO NO NO
3 rows selected.
SQL> alter table emp modify deptno not null ;
Table altered.
SQL> select *
2 from user_updatable_columns
3 where table_name ='EMP_VW' ;
OWNER TABLE_NAME COLUMN_NAME UPD INS DEL
------------------------------ ------------------------------ ------------------------------ --- --- ---
MCDONAC EMP_VW EMPNO NO NO NO
MCDONAC EMP_VW ENAME NO NO NO
MCDONAC EMP_VW DNAME NO NO NO
3 rows selected.
SQL>
SQL> alter view EMP_VW compile;
View altered.
SQL>
SQL> select *
2 from user_updatable_columns
3 where table_name ='EMP_VW' ;
OWNER TABLE_NAME COLUMN_NAME UPD INS DEL
------------------------------ ------------------------------ ------------------------------ --- --- ---
MCDONAC EMP_VW EMPNO YES YES YES
MCDONAC EMP_VW ENAME YES YES YES
MCDONAC EMP_VW DNAME NO NO NO
3 rows selected.
SQL>