CREATE PROCEDURE [dbo].[P_Max] @a int, -- 輸入 @b int, -- 輸入 @Returnc int output --輸出 AS if (@a>@b) set @Returnc =@a else set @Returnc =@b -- 調用 declare... ...
CREATE PROCEDURE [dbo].[P_Max] @a int, -- 輸入 @b int, -- 輸入 @Returnc int output --輸出 AS if (@a>@b) set @Returnc =@a else set @Returnc =@b -- 調用 declare @Returnc int exec P_Max 2,3,@Returnc output select @Returnc