update population set education_degree = (CASE
when education_degree='博士' THEN 0
when education_degree='研究生' THEN 1
when education_degree='本科' THEN 2
when education_degree='大专' THEN 3
when education_degree='中专或中技' THEN 4
when education_degree='技工学校' THEN 5
when education_degree='高中' THEN 6
when education_degree='初中' THEN 7
when education_degree='小学' THEN 8
when education_degree='文盲或半文盲' THEN 9
when education_degree='其他' THEN 99 END )
where education_degree in ('博士','研究生','本科','大专','中专或中技','技工学校','高中','初中','小学','文盲或半文盲','其他')
sql更新,字典值转换,
最新推荐文章于 2024-07-17 15:25:01 发布