Answers for "ERROR 3814 (HY000): An expression of a check constraint 'INV_CK1' contains disallowed function: `TO_DATE`."

0

ERROR 3814 (HY000): An expression of a check constraint 'INV_CK1' contains disallowed function: `TO_DATE`.

mysql> CREATE TABLE t1 (c1 INTEGER CHECK (c1 > 0));
Query OK, 0 rows affected (0.04 sec)
 
mysql> SHOW CREATE TABLE t1\G
*************************** 1. row ***************************
       Table: t1
Create Table: CREATE TABLE `t1` (
  `c1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
1 row in set (0.01 sec)
 
-- CHECK constraint search condition is not evaluated.
mysql> INSERT INTO t1 VALUES (0);
Query OK, 1 row affected (0.00 sec)
Posted by: Guest on October-20-2020

Code answers related to "ERROR 3814 (HY000): An expression of a check constraint 'INV_CK1' contains disallowed function: `TO_DATE`."

Code answers related to "Javascript"

Browse Popular Code Answers by Language