List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:February 7 2001 11:40pm
Subject:Re: CHECK variable incorrect?
View as plain text  
In the last episode (Feb 07), SF said:
> I did, and that's where I don't understand why this is happening. 
> The furthest I was able to get in the manual and/or any of the
> archives from MySQL is:
> (straight out of the manual)
> CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)]
> [table_options] [select_statement]
> create_definition:
>   col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT]
>             [PRIMARY KEY] [reference_definition]
>   or    PRIMARY KEY (index_col_name,...)
>   or    KEY [index_name] (index_col_name,...)
>   or    INDEX [index_name] (index_col_name,...)
>   or    UNIQUE [INDEX] [index_name] (index_col_name,...)
>   or    FULLTEXT [INDEX] [index_name] (index_col_name,...)
>   or    [CONSTRAINT symbol] FOREIGN KEY index_name (index_col_name,...)
>             [reference_definition]
>   or    CHECK (expr)
>         ^^^^^^^^^^^^
>         ||||||||||||
> The comment that CHECK (expr) is supposed to be written as such, is
> something that I either don't understand - and if so, what is wrong with it
> in the string I am using (line 4: "CHECK (rank IN (1,2,3))")? - or an error
> I don't understand is causing this - that's why I'm asking.

Look farther down in the manual:

   * 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 Missing functions::.

	Dan Nelson
CHECK variable incorrect?SF7 Feb
RE: CHECK variable incorrect?The Tilghman7 Feb
  • RE: CHECK variable incorrect?SF7 Feb
    • Re: CHECK variable incorrect?Dan Nelson8 Feb
    • Re: CHECK variable incorrect? [patch and other bug]pete8 Feb
RE: CHECK variable incorrect?Quentin Bennett8 Feb
  • Re: CHECK variable incorrect?Rolf Hopkins8 Feb