title: How to select the ALL passed parameter values inside the stored procedure in SQL like SQL Trace
body: <p>How to select all parameters and values passed to the stored procedure as like in SQL Trace, inside the procedure using any @@ function without any customization.
  For Example I have a stored procedure like</p>
  
  <pre><code>CREATE PROC test_Procedure
        @ln varchar(25) = '',
        @fn varchar(25) = '',
        @dob datetime = NULL,
              @id INT = 0
  AS
  BEGIN
              SELECT * FROM tb_users
              WHERE ln= @ln
              AND  fn = @fn
              AND  dob = @dob
              AND Id = @id
  
  ------------ SELECT @@
  END
  </code></pre>
  
  <p>If I called the procedure like</p>
  
  <pre><code>EXEC     [dbo].test_Procedure @ln = N'a',@fn = NULL,@dob = NULL,@id  = 1
  </code></pre>
  
  <p>I need to select this exact string inside the procedure using any built in function or user defined function .</p>