I have a table with about 10K rows, which I am trying to alter so that the field fielddelimiter
is never null. I am attempting to do an alter statement, expecting a
In my case I was setting the column to NOT NULL
ALTER TABLE `request_info`
CHANGE COLUMN `col_2` `col_2`
VARCHAR(2000)
NOT NULL -- here was setting it to NULL when the existing col allowed NULL
AFTER `col_1`
when previously I set the column to DEFAULT NULL (i.e. allow NULL values), so if you want to allow NULL then you can do the following:
ALTER TABLE `request_info`
CHANGE COLUMN `col_2` `col_2`
VARCHAR(2000)
DEFAULT NULL -- changed from NOT --> DEFAULT
AFTER `col_1`