使用用户定义的数据类型调试存储过程

ch3*_*r1f 2 t-sql sql-server

是否可以使用用户定义的数据类型作为参数调试存储过程?

编辑:调用它的语法是什么?(执行....)

我的风格:

CREATE TYPE [dbo].[FacturaInspeccion] AS TABLE(  
    [sIdServicio] [nvarchar](3) NOT NULL,  
    [nIdTipoInspeccion] [int] NOT NULL,  
    [sIdTipoMotivoInspeccion] [nvarchar](2) NOT NULL,  
    [nIdTipoVehiculo] [int] NOT NULL,  
    [nBase] [real] NOT NULL,  
    [nNoPeriodica] [real] NULL,  
    [nTarifaConProyecto] [real] NULL,  
    [nTarifaSinyecto] [real] NULL,  
    [nTasaTrafico] [real] NULL,  
    [nDescuento] [real] NULL,  
    [nTotal] [float] NULL  
Run Code Online (Sandbox Code Playgroud)

)
GO

ch3*_*r1f 5

我意识到它只是一个表,所以我声明了类型,插入了值并调用了存储过程.

存储过程声明:

CREATE PROCEDURE [dbo].[spInsertarFactura]
@tableFacturaInspeccion FacturaInspeccion READONLY,
...

调用存储过程:

USE [DATABASE] GO
DECLARE @return_value int

DECLARE @tablaTmp FacturaInspeccion

INSERT INTO @tablaTmp(sIdServicio,nIdTipoInspeccion,sIdTipoMotivoInspeccion,nIdTipoVehiculo,nBase,nNoPeriodica,nTarifaConProyecto,nTarifaSinyecto,nTasaTrafico,nDescuento,nTotal)
VALUES(79,1,'00',1,2,2,2,2,10,10 ,100)

EXEC @return_value = [dbo].[spInsertarFactura]

之后,有时间调试.