Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: constraints to views

Re: constraints to views

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Wed, 25 Aug 1999 14:18:54 +0800
Message-ID: <37C38ACE.7B5E@yahoo.com>


Nandakumar wrote:
>
> Hi
>
> If a view is created over a table that has no constraints, is it
> possible to attach some constraints to the view.
>
> Say 'tableA' has four fields F1,F2,F3,F4.
> A view 'viewA' is created with F1 and F2.
> I want to create a constraint NOT NULL to F1 and F2 to 'viewA'.
> ie tableA can accept NULL values to F1 and F2 thru' other views.
> But inserting NULLs to F1 and F2 through 'viewA' is not allowed.
>
> Could anyone give the ways to do it without using triggers?
>
> --
> Nandakumar
> Systems Analyst
> New York
> (N.Kumar_at_rocketmail.com)
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

The closest I can think is to have the view only contain the NOT NULL rows (ie include this in the view defintion) and then add the CHECK option.

HTH
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Wed Aug 25 1999 - 01:18:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US