use db declare @order nvarchar(50) set @order = '订单号' -- 先删除client中的信息; delete from client where id = @order -- 再从dindan中插入新的记录; insert into client(id,name1,name2) select id, name1, name2 from dindan where id = @order