Author Topic: Adding check constraints to relational tables  (Read 2829 times)

abcoates

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Adding check constraints to relational tables
« on: December 27, 2002, 12:27:59 pm »
The documentation doesn't make it clear how to add check constraints to relational columns/tables.  I can create a check constraint, but I can't work out where to put the constraint test so that it appears in the generated DDL.

I am trying to limit a CHAR(1) column to take one of a set of 6 character values.  Thanks in advance for any advice,

   Cheers,
       Tony.

abcoates

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Adding check constraints to relational tables
« Reply #1 on: December 27, 2002, 02:24:20 pm »
Ah-ha.  Worked it out.  The text of the "Notes" for the constraint is inserted as the SQL text of the check.  A similar thing happens to the "Notes" text for a trigger.

   Cheers,
       Tony.