Here Is the stored procedure:
CREATE PROCEDURE [dbo].[sp_Login]
@Email nvarchar(50),
@Password nvarchar(50),
@UserId uniqueidentifier output,
@UserType int output,
@IsVerify bit output,
@IsPremium bit output
AS
BEGIN
SELECT @UserId = UserId FROM Users WHERE Email = @Email AND [Password] = @Password
SELECT @IsVerify = IsVerify FROM Users WHERE Email = @Email AND [Password] = @Password
SELECT @UserType = UserType FROM Users WHERE Email = @Email AND [Password] = @Password
SELECT @IsPremium = IsPremium FROM Users WHERE Email = @Email AND [Password] = @Password
END
My question is: There is way to return this parameters as “output” without call to same “select” function 4 times.
you can use single select statement like