I was reviewing someone else's code and came across the following code...
It is a stored procedure that alters itself? But I don't see that it alters anything.
It also has 2 nested begin and end statement but they seem to be redundent?
Thanks
Simi
ALTER PROCEDURE [dbo].[sp_Account_Identification_Question_Select_Param]
@Account_Identification_Question_ID int=null
AS
IF (@Account_Identification_Question_ID is not null )
BEGIN
BEGIN
select * from Account_Identification_Question
where Account_Identification_Question_ID = @Account_Identification_Question_ID
END
END
ELSE
BEGIN
select * from Account_Identification_Question
END
It is a stored procedure that alters itself? But I don't see that it alters anything.
It also has 2 nested begin and end statement but they seem to be redundent?
Thanks
Simi
ALTER PROCEDURE [dbo].[sp_Account_Identification_Question_Select_Param]
@Account_Identification_Question_ID int=null
AS
IF (@Account_Identification_Question_ID is not null )
BEGIN
BEGIN
select * from Account_Identification_Question
where Account_Identification_Question_ID = @Account_Identification_Question_ID
END
END
ELSE
BEGIN
select * from Account_Identification_Question
END