Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.2(EOL)
Description
According to the sql standard the following is valid command:
CREATE TABLE Table_1 ( |
column_1 SMALLINT |
CONSTRAINT constraint_1 CHECK(column_1<400), |
column_2 CHAR(5)); |
Oracle grammar examples indicate the same:
CREATE TABLE employees_demo |
( employee_id NUMBER(6)
|
, first_name VARCHAR2(20)
|
, last_name VARCHAR2(25)
|
CONSTRAINT emp_last_name_nn_demo NOT NULL |
, email VARCHAR2(25)
|
CONSTRAINT emp_email_nn_demo NOT NULL |
...
|
But both 10.2.6 and 10.3.0 show syntax error:
mysql> CREATE TABLE Table_1 (
|
-> column_1 SMALLINT
|
-> CONSTRAINT constraint_1 CHECK(column_1<400),
|
-> column_2 CHAR(5));
|
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CONSTRAINT constraint_1 CHECK(column_1<400),
|
column_2 CHAR(5))' at line 3
|
Attachments
Issue Links
- relates to
-
MDEV-7563 Support CHECK constraint as in (or close to) SQL Standard
- Closed