mysql> CREATE TABLE test ( -> age INT(3), -> CONSTRAINT CHECK (age > 0) -> ); Query OK, 0 rows affected (0.00 sec)
I then inserted -1 into the table, which it shouldn't have let me do.
mysql> insert into test values (-1); Query OK, 1 row affected (0.00 sec)
mysql> select *From test; +------+ | age | +------+ | -1 | +------+ 1 row in set (0.01 sec)
How can I enforce the CHECK constraint ?
thanks
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]