I have a store procedure like this :
ALTER PROCEDURE [dbo].[CheckUser&Pass]
(
@Username nchar(15),
@Password nchar(15)
)
AS
SET NOCOUNT ON;
SELECT Username, Pass, Code_Person
FROM Login
WHERE (Username = @Username) AND (Pass = @Password)
And Execution :
DECLARE @return_value int
EXEC @return_value = [dbo].[CheckUser&Pass]
@Username = N'admin',
@Password = N'1234'
SELECT 'Return Value' = @return_value
GO
I Want to know how I can set @return_Value to 1 when the username is admin and password is 1234.
but it doesn't work properly, is that possible ?