In the last episode (Jul 12), Larry Irwin said:
> I'd like to set up my CREATE's to have CHECK and REGEXP but can't
> seem to get 4.0.2 to accept my attempts...
> 
> CREATE TABLE IF NOT EXISTS aptype (
> aptype_id          INT UNSIGNED NOT NULL AUTO_INCREMENT,
> appt_type         VARCHAR(3) NOT NULL,
> branch              VARCHAR(2),
> print_ticket       VARCHAR(1), CHECK (SELECT (print_ticket) REGEXP "[0-9]"),
> print_on_stmt    VARCHAR(1), CHECK (print_on_stmt IN "Y|N|E|R"),
> produce_ticket  VARCHAR(1), CHECK (produce_ticket REGEXP [ASP])
> ) TYPE=InnoDB;

http://www.mysql.com/doc/C/R/CREATE_TABLE.html

   * The `FOREIGN KEY', `CHECK', and `REFERENCES' clauses don't
     actually do anything.  The syntax for them is provided only for
     compatibility, to make it easier to port code from other SQL
     servers and to run applications that create tables with references.
     *Note Differences from ANSI::.

Just remove the CHECK() clause completely.

-- 
        Dan Nelson
        [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to