从dindan表更新client表顾客姓名.sql 236 B

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