alter table imcc.agentstatuslog add primary key (id)
select count(1) from imcc.agentstatuslog where id is null
delete from imcc.agentstatuslog where id is null
alter table imcc.agentstatuslog add primary key (id)
select count(1) from imcc.agentstatuslog where id is null
delete from imcc.agentstatuslog where id is null