MS SQL 2008 es compatible con TVP: una función útil para la carga masiva de datos a un procedimiento almacenado para su procesamiento.
En lugar de crear un tipo definido por el usuario, ¿es posible aprovechar una definición de tabla existente? Por ejemplo, ¿es posible crear un procedimiento almacenado con la siguiente firma?
CREATE PROCEDURE usp_InsertProductionLocation
@TVP **LocationTable** READONLYLa documentación parece sugerir que esto no es posible.
CÓDIGO DE MUESTRA
/*
Sample code from:
http://msdn.microsoft.com/en-us/library/bb510489.aspx
*/
USE AdventureWorks2008R2;
GO
/* Create a table type. */
CREATE TYPE LocationTableType AS TABLE 
( LocationName VARCHAR(50)
, CostRate INT );
GO
/* Create a procedure to receive data for the table-valued parameter. */
CREATE PROCEDURE usp_InsertProductionLocation
    @TVP LocationTableType READONLY
    AS 
    SET NOCOUNT ON
    INSERT INTO [AdventureWorks2008R2].[Production].[Location]
           ([Name]
           ,[CostRate]
           ,[Availability]
           ,[ModifiedDate])
        SELECT *, 0, GETDATE()
        FROM  @TVP;
        GO
/* Declare a variable that references the type. */
DECLARE @LocationTVP 
AS LocationTableType;
/* Add data to the table variable. */
INSERT INTO @LocationTVP (LocationName, CostRate)
    SELECT [Name], 0.00
    FROM 
    [AdventureWorks2008R2].[Person].[StateProvince];
/* Pass the table variable data to a stored procedure. */
EXEC usp_InsertProductionLocation @LocationTVP;
GO
/*
The following is not part of the original source code:
*/
CREATE TABLE LocationTable(
 LocationName VARCHAR(50)
, CostRate INT );
GOfuente

Erland Sommarskog tiene un extenso artículo que describe cómo usar TVP.
¡Mira, vale la pena!
En resumen, no puede usar un tipo existente, al igual que la respuesta anterior de Aaron Bertrand . Pero al menos es una transferencia masiva ...
fuente
Basado en la respuesta de Jiten, simplificando parte de la lógica en lugares, contabilizando
identitycolumnas (usandosys.tablas en lugar deSCHEMEA)fuente