您好,可以参考一下语句:
alter table intelligence_source_tag modify threat_type INT;
update intelligence_source_tag set threat_type=
case
when threat_type=‘MALICE’ then 0
when threat_type=‘NORMAL’ then 1
when threat_type=‘SUSPECTED’ then 2
when threat_type=‘UNKNOWN’ then 3
else null
end;
您好,可以参考一下语句:
alter table intelligence_source_tag modify threat_type INT;
update intelligence_source_tag set threat_type=
case
when threat_type=‘MALICE’ then 0
when threat_type=‘NORMAL’ then 1
when threat_type=‘SUSPECTED’ then 2
when threat_type=‘UNKNOWN’ then 3
else null
end;