日期:2014-05-18 浏览次数:20777 次
ALTER PROCEDURE [dbo].[PersonCount] -- Add the parameters for the stored procedure here @Personid int, @Personidout int OUTPUT -- <@Param2, sysname, @p2> <Datatype_For_Param2, , int> = <Default_Value_For_Param2, , 0> AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; SELECT @Personidout = MAX(age)+1 from Person SELECT Count(id)as Personid from Person where id=@Personid -- Insert statements for procedure here --SELECT <@Param1, sysname, @p1>, <@Param2, sysname, @p2> END
--DECLARE @RC int DECLARE @Personid INT DECLARE @Personidout INT -- TODO: 在此处设置参数值。 EXECUTE [AnodTestJoin].[dbo].[PersonCount]@Personid=2, @Personidout OUTPUT Select 'person '+str(@Personidout)
--DECLARE @RC int DECLARE @Personid INT DECLARE @Personidout INT -- TODO: 在此处设置参数值。 EXECUTE [AnodTestJoin].[dbo].[PersonCount]@Personid=2, @Personidout = @Personidout OUTPUT Select 'person '+str(@Personidout)