DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Table constraints

  1. #1
    Join Date
    Apr 2001
    Posts
    112
    I would like to know the syntax for putting a table constraint as follows:

    Create Table tmp(id number, name varchar2(13));

    How do I put a constraint if id =100 then name must be 'Peter' . I dont want to make use of triggers.

    Thanks

  2. #2
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Thanx
    Sam



    Life is a journey, not a destination!


  3. #3
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    AFAIK you cannot do that, a check constraint on 1 column cannot reference another one, and I don't see how you could use another type of constraint to do that ...

Posting Permissions

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


Click Here to Expand Forum to Full Width