title: Delete statement not working in Stored Procedure
body: <p>I am trying delete multiple records from store procedure SQL-Server 2012. I have select and then delete statement, apparently my delete statement is not been called</p>
  
  <pre><code>ALTER PROCEDURE [dbo].[DeleteFunctionsNavigation]
  
   @FunctionName nvarchar(250),
   @Function_identity INT OUTPUT
     AS
     BEGIN    
  SET NOCOUNT ON;
  
  SELECT Navigation_Functions.Function_ID 
  FROM Navigation_Functions 
  WHERE Navigation_Functions.FunctionName = @FunctionName
  SET @Function_identity=SCOPE_IDENTITY()
  
  DELETE FROM Navigation_FunctionHierarchy
  WHERE Navigation_FunctionHierarchy.Function_IDs = @Function_identity
  
     RETURN
  END
  </code></pre>