title: Issue with User Defined Table type in stored procedure
body: <p>I created a user defined table type as below</p>
  
  <pre><code>CREATE TYPE [emp_TT] AS TABLE 
  (
   em_number            char(12),
   email                varchar(50),
   emergency_relation   char(32),
   option1              char(16),
  )
  GO
  </code></pre>
  
  <p>It got created under the Types as</p>
  
  <p><a href="https://i.stack.imgur.com/DbGkc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DbGkc.png" alt="enter image description here"></a></p>
  
  <p>And trying to use them in my stored procedure like</p>
  
  <pre><code> ALTER PROCEDURE [dbo].[uspInsertorUpdateArchibusINF]
   @emp_TT AS emp_TT READONLY
   AS
   BEGIN
   SET NOCOUNT ON;
  
   BEGIN TRANSACTION;
  
   UPDATE e
   SET e.email                 = t.email,
       e.emergency_relation    = t.emergency_relation,
       e.option1               = t.option1,
       FROM [afm].[em] e 
    INNER JOIN @emp_TT t ON e.em_id = t.em_id
  
    INSERT INTO [afm].[em](email, emergency_relation, option1, em_id)
    SELECT t.email
      , t.emergency_relation,t.option1
      , t.em_id
   FROM @emp_TT t 
   WHERE NOT EXISTS (SELECT 1 
                  FROM [afm].[em]
                  WHERE em_id = t.em_id)
   COMMIT TRANSACTION;
  
   END;
  </code></pre>
  
  <p>When I  execute the stored procedure it is throwing the error like</p>
  
  <p><code>Column, parameter, or variable #1: Cannot find data type emp_TT.</code>
  <code>Parameter or variable '@emp_TT' has an invalid data type.</code></p>
  
  <p><code>Must declare the table variable "@emp_TT".</code></p>
  
  <p><code>Must declare the table variable "@emp_TT".</code></p>
  
  <p>Please let me know what I am missing here</p>