List:General Discussion« Previous MessageNext Message »
From:Larry Irwin Date:July 12 2002 9:01pm
Subject:CHECK syntax
View as plain text  
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;

None of the CHECK stmts will pass the syntax checker...
Help greatly appreciated.
Larry Irwin
CCA Medical
sql, query

Thread
CHECK syntaxLarry Irwin12 Jul
  • Re: CHECK syntaxDan Nelson12 Jul