Column constraints

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ron VanDerMaarel

    #1

    Column constraints

    Hi,

    I am not familiar with MySQL, but we are currently looking at it.
    Currently our software product supports Oracle, DB2, and we want to
    see what it takes to also include MySQL.

    One stumbling block we have come across is that it seems that the
    CREATE TABLE command does not support the CHECK CONSTRAINT on a
    column. I know there is such a thing as the ENUM column in MySQL, but
    what if we want to set the constraint between two values.

    Example:

    CREATE TABLE TMPTABLE
    COLONE CHAR(10),
    COLTWO INT CHECK (COLTWO BETWEEN 1 AND 200)....


    Is there such a thing in MySQL.

    Thanks
    Ron VanDerMaarel
Working...