title: Update stored procedure query using SQL Server table type - how to?
body: <p>I already have a working stored procedure that takes data from tabletype like in this example </p>
  
  <pre><code>CREATE PROCEDURE [dbo].[tblDefQ_Detail_INSERT]
    @Quotient_D Quotient_D  READONLY
  AS
  BEGIN
      SET NOCOUNT ON;
  
      INSERT INTO Quotient_D ([q_id], [item_id], [item_name])
         SELECT 
             [q_id], [item_id], [item_name] 
         FROM 
             @Quotient_D 
   END
  </code></pre>
  
  <p>This stored procedure takes values from table type as coded</p>
  
  <pre><code>CREATE TYPE [dbo].[Quotient_D] AS TABLE(
  [q_id] [int] NULL,
  [item_id] [int] NULL,
  [item_name] [nvarchar](50) NULL
  )
  </code></pre>
  
  <p>This works fine.</p>
  
  <p>What I want now is an <code>UPDATE</code> stored procedure that take values from this table type using where clause on</p>
  
  <pre><code>q_id
  </code></pre>