Follow by Email

Friday, 14 December 2012

Select username,password StoredProcedure in SQL Server


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:        <Author,,Abhinav>
-- Create date: <Create Date,,14/12/2012>
-- Description:    <Description,,Check Login>
-- =============================================
CREATE PROCEDURE LoginProc
    -- Add the parameters for the stored procedure here
    @userName varchar(30),
    @pass varchar(30)
   
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    -- Insert statements for procedure here
    SELECT userName,pass,userAccessTypeId From UsersLogin Where userName=@userName AND pass=@pass
END
GO

0 comments:

Post a Comment


                                                            

 
Design by Abhinav Ranjan Sinha