如何在存储过程内部调用另一个存储过程 EXEC

-- =============================================
-- Author:		<Author,,LY>
-- Create date: <Create Date>
-- Description:	<Description, 改变订单的签收时间 >
-- 测试通过
-- =============================================

ALTER PROCEDURE [dbo].[CHANGE_RECEIVE_ORDER_TIME]
(
@order_id int,
@rtime datetime,
@receiver nvarchar(20)
)
as
begin
	update orders set receive_time = @rtime where order_id = @order_id
	update orders set order_status = '已签收' where order_id = @order_id
	update orders set receiver = @receiver where order_id = @order_id
	declare @tmp int
	EXEC [dbo].CHANGE_PRODUCT_STATUS_BY_ORDER @order_id,'已签收',@tmp
end

 

posted @ 2013-03-26 16:57  门对夕阳  阅读(431)  评论(0编辑  收藏  举报