CREATE PROCEDURE Admin_UserExists(@UserName varchar(100),@nReturn int =0 Output) AS select @nReturn=0 if EXISTS(select UserName from T_Users where UserName = @UserName) begin select @nReturn=1 end return @nReturnGO
CREATE PROCEDURE [dbo].GetTitle @id bigint, -- This is the input parameter. @title nvarchar(210) OUTPUT -- This is the output parameter. AS SELECT top 1 @title = isnull([title],'') FROM [book] WHERE [id] <= @id AND [id] >= @idRETURNGO
AS
select @nReturn=0 if EXISTS(select UserName from T_Users where UserName = @UserName)
begin
select @nReturn=1
end
return @nReturnGO
CREATE PROCEDURE [dbo].GetTitle
@id bigint, -- This is the input parameter.
@title nvarchar(210) OUTPUT -- This is the output parameter.
AS SELECT top 1 @title = isnull([title],'')
FROM [book]
WHERE [id] <= @id AND [id] >= @idRETURNGO