Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

view with check option is not working as excepted

Arun NMar 21 2016 — edited Mar 21 2016

Hi,

I've created following views

condition1

create view depart_80

as

select * from employees

where department_id=80

update depart_80

set first_name='sss'

where department_id=60

0 row updated.

condition2 -- with check option

create view depart_80

as

select * from employees

where department_id=80

with check option constraint depart_80

update depart_80

set first_name='sss'

where department_id=60


0 row updated.


In both the views , i can't update the table employees using the view depart_80 when department_id is not 80. Then what is the use of "with check option constraint" in condition2. when both the view conditions are performing the same task ????


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 18 2016
Added on Mar 21 2016
2 comments
767 views