Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Location
    Mumbai, India
    Posts
    16

    Exclamation Unanswered: Is it Possible to Use Select in Check Constraint

    dear all
    i want to know that is it posible to use select statement in a check constraint. if possible how to make that
    thanx in advance
    G.Sakthi

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    When all else fails, RTFM
    http://download-west.oracle.com/docs...3a.htm#1002166
    says:
    Restrictions on Check Constraints

    * You cannot specify a check constraint for a view. However, you can define the view using the WITH CHECK OPTION clause, which is equivalent to specifying a check constraint for the view.
    * The condition of a check constraint can refer to any column in the table, but it cannot refer to columns of other tables.
    * Conditions of check constraints cannot contain the following constructs:
    o Subqueries and scalar subquery expressions
    o Calls to the functions that are not deterministic (CURRENT_DATE, CURRENT_TIMESTAMP, DBTIMEZONE, LOCALTIMESTAMP, SESSIONTIMEZONE, SYSDATE, SYSTIMESTAMP, UID, USER, and USERENV)
    o Calls to user-defined functions
    o Dereferencing of REF columns (for example, using the DEREF function)
    o Nested table columns or attributes
    o The pseudocolumns CURRVAL, NEXTVAL, LEVEL, or ROWNUM
    o Date constants that are not fully specified
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Feb 2004
    Posts
    108
    See if FK works in this case !

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Tell us what the rule is you are trying to implement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •