Problem with ALTER TABLE and ADD CONSTRAINT
My MariaDB version id 10.5.9, running on Manjaro Nibia (20.2.1).
I am trying to add a CHECK constraint to an existing field. This is my statement, modelled on the syntax at https://mariadb.com/kb/en/constraint/
ALTER TABLE sources ADD CONSTRAINT chk_under1000 CHECK (source_dances < 1000);
I get the following error: "A new statement was found, but no delimiter between it and the previous one. (near CHECK)". I get this error irrespective of whether I use backtick field delimiters or not. phpMyAdmin also flags up CHECK as an error.
What am I doing wrong, please?
Michael Barraclough
Answer Answered by Ian Gilfillan in this comment.
This appears to be a phpMyAdmin error (and the issue has been an open bug since 2017), so I suggest using an alternative client.