Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Constraints on views - disable novalidate
"Peter" <peter_at_nomorenewspamin.ca> wrote in message
news:smvtqvcc1k59bi7udlces98ba7urqha71a_at_4ax.com...
> When creating a constraint on views, why is it necessary to include
> the "disable nonvalidate" keyword?
>
version # and example please
> What is the difference between
> "enable novalidate" and "disable validate"?
>
enable/disable is the state of the constraint
validate / novalidate is what to do with existing data when creating or
> With the "enable novalidate" constraint, Oracle will not validate
> existing data but will validate future data. How about changing data
> of existing rows?
>
updates are 'future data' -- suggest you do a little experimenting when faced with questions like this (whenever you have a 'what happens if' question, first you should try it out for yourself if at all possible
> When you create a table with the "disable validate" constraint, does
> that mean you cannot add any new rows to the table?
did you try this?
disable: constraint state
validate: what to do with existing data when enabling it
> I cannot see why as Oracle will still validate the existing data, but
> no new data will be validated.
wrong conclusion, but it is typical to disable a constraint during maintenance, test, or data load operations then enable it with or without validating
>
> Does Oracle validate existing data in the table on every DML
> statement?
>
think this one through -- what would be logical?
> Thanks
>
suggest you do a bit more reading in the concepts and SQL manual on managing constraints, and then do a little experimentation -- you'll learn a lot that way
--mcs Received on Mon Nov 10 2003 - 05:19:28 CST