Ayush Patil

Ayush Patil

  • NA
  • 178
  • 20.2k

Passing Column Name as pareameter

Feb 28 2018 12:09 AM
 
ALTER PROCEDURE [dbo].[GetLoginByIdentifyPasswordDOB]
-- Add the parameters for the stored procedure here
@Identify varchar(50) ,
@Password varchar(50) ,
@Date_Of_Birth Datetime
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
select * from Policy_Holder_Details where @Identify=@Password and Date_Of_Birth = @Date_Of_Birth
END
 
Here i m Pass @Identify as column name and  in @Password as column value.
 

Answers (9)