SQL Server创建存储过程和删除存储过程

2014-11-24 10:11:27 · 作者: · 浏览: 0

SQL Server创建存储过程和删除存储过程
创建存储过程: www.2cto.com
create procedure dbo.order_account
@@merchantId varchar(30),
@@totalAmount numeric(15,3)=0 output
AS
DECLARE @tempAmount numeric(15,3)
select @tempAmount = sum(fd_tx_money) from tb_order where fd_merchant_id=@@merchantId
set @@totalAmount = @tempAmount
删除存储过程:
drop proc order_account