Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Inserting through a view - forcing certain values into columns
Hi
Say you have a table:
create table mytab
(id number,
name varchar2(30),
filter_col varchar2(1));
Then you create a view on this
create or replace view mytab_v
as
(select *
from mytab
where filter_col = 'Y');
insert into mytab_v (id, name, filter_col) values (1, 'xxx','N');
I was wondering whether, on inserting a row via the view, the filter_col would automatically be given the value 'Y' or that if another value was supplied that some kind of implicit constraint might be violated. This doesn't appear to be the case, but is it possible to implement a view in such a way that such validation would be performed?
-- jeremy ============================================================ ENVIRONMENT: Oracle 9iR2 / Oracle HTTP Server / mod_plsql / Solaris 8 ============================================================Received on Mon Mar 12 2007 - 06:31:35 CDT
![]() |
![]() |