Maybe it's just to late for me to think clearly but there are NO INTEGERS
between 0 and 1, try FLOAT or DECIMAL.

Best/h


On 12/3/02 1:08 AM, "Achille M. Luongo" <[EMAIL PROTECTED]> wrote:

> Dear subscribers,
> 
> MySQL seems to support the CHECK() clausole in the implementation of CREATE
> TABLE statement, but MySQL (Ver 11.15 Distrib 3.23.39, for pc-linux-gnu)
> returns a syntax error on such a command. For example:
> 
> mysql> CREATE TABLE example (var INTEGER, CHECK(var BETWEEN 0 AND 1));
> ERROR 1064: You have an error in your SQL syntax near '(var BETWEEN 0 AND
> 1))' at line 1
> 
> If I remove the CHECK clausole, the sql statement works:
> 
> mysql> CREATE TABLE example (var INTEGER);
> Query OK, 0 rows affected (0.01 sec)
> 
> Can anyone suggest me how to correctly use the CHECK clausole in MySQL
> (even if for compatibility issues with other sql databases) ?
> 
> Thanks in advance for your suggestions.
> 
> Achille


---------------------------------------------------------------------
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