Sql 将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 @ 2020-08-14 14:27  春夏秋冬的千山万水  阅读(422)  评论(0)    收藏  举报