You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create the below table using the SQLyog ‘Create Table’ option/grid, but do not type the parentheses for the CHECK condition (i.e., type the text highlighted `val` = 1 OR `val` IS NULL ).
CREATE TABLE `test` (
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`val` INT(11)COMMENT 'abcd' CHECK (`val` = 1 OR `val` IS NULL),
PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8;
NB: SQLyog encloses the column level CHECK constraint's condition in parenthesis in the query generated.
Using the ‘Alter Table’ option, replace the entire column level check condition with `val` = 1. And save the changes.
It returns the syntax error since the check condition isn’t enclosed in parenthesis.
The text was updated successfully, but these errors were encountered:
Server affected: MariaDB 11.1.3 and below
Steps to reproduce:
`val` = 1 OR `val` IS NULL
).NB: SQLyog encloses the column level CHECK constraint's condition in parenthesis in the query generated.
Using the ‘Alter Table’ option, replace the entire column level check condition with
`val` = 1
. And save the changes.It returns the syntax error since the check condition isn’t enclosed in parenthesis.
The text was updated successfully, but these errors were encountered: