I have a table with lots of records. My table has the following field, with records containing either NULL or ‘1’ that I need to modify.
– Current
archived
int(1) unsigned DEFAULT NULL
But I need to modify it so that it is NOT NULL and defaults to ‘0’. I have tried the following but it throws an error.
– Error “#1265 - Data truncated for column ‘archived’ at row 1”
ALTER TABLE proposal_info
MODIFY archived
INT( 1 ) UNSIGNED NOT NULL DEFAULT ‘0’
I need to modify the table so that the records that are NULL for that field, will be updated to ‘0’. I need the records that are currently ‘1’, to retain that value.