I need to edit a datatype (IS_NULLABLE) from my column tag. Nothing works, i have tried like that:
ALTER TABLE veille
ALTER COLUMN tag
SET IS_NULLABLE false
or like that :
ALTER TABLE veille ALTER COLUMN tag Modify datatype false
but doesn't work too, i have this error :
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 'IS_NULLABLE false' at line 3.
Edit : Resolved, the problem was my column has null values, i have changed these null values and all works fine.
try
ALTER TABLE veille_ndd_hist MODIFY tag bit(1) NOT NULL DEFAULT b'0;
you may also try
ALTER TABLE veille_ndd_hist CHANGE COLUMN tag tag BIT NOT NULL
Note that when using MODIFY, you need to specify the full column definition, including DEFAULT value if was defined.
side note: of course make sure that the column does not have any null values