Live2D

Sql 将A表数据插入到B表

A表和B表字段不同

--insert into B(Name,PersonalId,Education,IsDel)
select Name,
PersonId as PersonalId,
(
case ltrim(rtrim(A.Education)) 
when '中专' then '中学' 
when '大专' then '大学' 
when '本科' then '大学' 
when '本科及以上' then '本科及以上' 
else  '' end
) as Education,
0 IsDel
from A where id in(
select id from A
where Isdel=0
)

 

posted @ 2019-08-27 11:44  webmtjj  阅读(5420)  评论(0)    收藏  举报