日期:2014-05-18 浏览次数:20390 次
IF EXISTS (SELECT * FROM sys.objects O WHERE O.type='P' AND O.name='XT_PROC_GetBillNo') BEGIN DROP PROCEDURE XT_PROC_GetBillNo END GO CREATE PROCEDURE XT_PROC_GetBillNo @BillNo VARCHAR(100) OUT AS BEGIN select @BillNo= 'ACD' END GO ----执行存储过程 DECLARE @BillNo INT EXECUTE XT_PROC_GetBillNo @BillNo SELECT @BillNo
IF EXISTS (SELECT * FROM sys.objects O WHERE O.type='P' AND O.name='XT_PROC_GetBillNo') BEGIN DROP PROCEDURE XT_PROC_GetBillNo END GO CREATE PROCEDURE XT_PROC_GetBillNo @BillNo VARCHAR(100) OUT AS BEGIN select @BillNo= 'ACD' END GO ----执行存储过程 DECLARE @BillNo VARCHAR(100) EXECUTE XT_PROC_GetBillNo @BillNo OUT SELECT @BillNo /* ACD */