check约束好像不起作用啊?!

check约束好像不起作用啊?!

情况如下:

mysql> create table t (c1 integer check (c1  < 50));
Query OK, 0 rows affected (0.03 sec)

mysql> insert into t values(20);
Query OK, 1 row affected (0.00 sec)

mysql> insert into t values(60);
Query OK, 1 row affected (0.00 sec)

mysql> select * from t;
+------+
¦ c1    ¦
+------+
¦   20  ¦
¦   60  ¦
+------+
2 rows in set (0.00 sec)

怎么回事?

谢谢!

你可能感兴趣的:(mysql)