title: Print an error message when there is the input parameter is null and terminate the procedure
body: <p>I am writing a SQL stored procedure, there is one input parameter which is required. How could I output a text error message when the parameter is null at the beginning of the procedure and terminate the procedure? </p>
  
  <pre><code>IF NULLIF(@P_Currentperiod, '') IS NULL
      BEGIN 
      --????
  
      RETURN
      END
  ELSE
  </code></pre>
  
  <p>Any help would be really appreciated!</p>