删除婚庆服务预约.sql 413 B

123456789101112131415161718192021222324
  1. -- 第一步;
  2. use db
  3. declare @order nvarchar(50)
  4. set @order = '20160326-001'
  5. -- 先查找指定的订单号的商品信息;
  6. select * from dindansp where id = @order
  7. /*
  8. -- 第二步;
  9. use db
  10. go
  11. declare @order nvarchar(50)
  12. declare @spname nvarchar(50)
  13. declare @spid nvarchar(50)
  14. set @order = '订单号'
  15. set @spname = '婚庆服务名'
  16. set @spid = '婚庆服务id'
  17. delete from dindansp where id = @order and spid = @spid and name = @spname
  18. */