批量插入数据
insert into A表数据库名.[dbo].A(a,b,c)
(select a,b,c from B表数据库名.[dbo].B)
批量更新数据
根据身份证第二位更新性别
update Person set
Sex = case SUBSTRING(ID_Num,17,1)%2 when 1 then '男' else '女' end from Person
insert into A表数据库名.[dbo].A(a,b,c)
(select a,b,c from B表数据库名.[dbo].B)
根据身份证第二位更新性别
update Person set
Sex = case SUBSTRING(ID_Num,17,1)%2 when 1 then '男' else '女' end from Person