db

mysql error - Invalid use of NULL value (이미 null들어간 column not null로 만들때 에러)

sunny___ 2020. 5. 25. 15:36
반응형

alter table cdp.tb_rc_service_base modify biz_area varchar(500) NOT NULL;

실행시 Error Code: 1138. Invalid use of NULL value 발생.

not null column에 이미 null이 들어가있어 문제됨, null이 되지 않도록 update하거나

alter table cdp.tb_rc_service_base modify biz_area varchar(500) NOT NULL default ''; 수행하면됨 

반응형