How to add named not null constraint
mysql, sql
Solution
ALTER TABLE students ADD CONSTRAINT NN_Grade CHECK (adm_no IS NOT NULL);
Problem
I am trying to add a NOT NULL constraint by the name 'NN_Grade' in existing column 'grade'. but not able to do getting error - My question is - Add a constraint (NN_Grade) in table Empl that declares column Grade NOT NULL. My Command which I tried- ``` ALTER TABLE students ADD CONSTRAINT NN_Grade NOT NULL(adm_no); ``` Error - 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 'NOT NULL(adm_no)' at line 1 Need guidance