Re: Beginner, using IF/THEN/ELSE inside a CHECK clause ?

From: annabelle <ametayer98_at_hotmail.com>
Date: 6 Nov 2002 16:46:04 -0800
Message-ID: <8235efb6.0211061646.13d1f177_at_posting.google.com>


Thank you very much, these are great tips, I am going to read those documents right away :)

elliott_craig_at_hotmail.com (Craig) wrote in message news:<4f71eb53.0211060955.4aad600c_at_posting.google.com>...
> hi,
>
> read this.
>
> http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/server.901/a90125/statements_412a.htm#2061500
>
> CHECK Constraints
> The CHECK clause lets you specify a condition that each row in the
> table must satisfy. To satisfy the constraint, each row in the table
> must make the condition either TRUE or unknown (due to a null). When
> Oracle evaluates a CHECK constraint condition for a particular row,
> any column names in the condition refer to the column values in that
> row.
>
> If you create multiple CHECK constraints for a column, design them
> carefully so their purposes do not conflict, and do not assume any
> particular order of evaluation of the conditions. Oracle does not
> verify that CHECK conditions are not mutually exclusive.
>
> See Also:
> Chapter 5, "Conditions" for additional information and syntax
>
>
>
>
> Restrictions on CHECK Constraints
>
> You cannot specify a CHECK constraint for a view.
>
> The condition of a CHECK constraint can refer to any column in the
> table, but it cannot refer to columns of other tables.
>
> CHECK constraint conditions cannot contain the following constructs:
>
> Subqueries
>
> Calls to the functions SYSDATE, UID, USER, or USERENV
>
> The pseudocolumns CURRVAL, NEXTVAL, LEVEL, or ROWNUM
>
> Date constants that are not fully specified
Received on Thu Nov 07 2002 - 01:46:04 CET

Original text of this message