首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

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

2012-11-23 
SQL Server创建存储过程和删除存储过程创建存储过程:create procedure dbo.order_account@@merchantId var

SQL Server创建存储过程和删除存储过程
创建存储过程:
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

热点排行