表类型可以用在存储过程中,用于批量增加
表类型定义:
CREATE TYPE dbo.SubCardTable as table
(
[SC_ID] [varchar](50),
[ZhuKaInfo_ID] [varchar](50),
[Project_KeyName] [varchar](50),
[SC_CardNumber] [varchar](50),
[Statues] [int] DEFAULT 0,
[SC_AddTime] [datetime],
[SC_AddPerson] [varchar](50),
[SC_Money] [int],
[MainCardReceiveIntegral] [int] DEFAULT 0,
[SC_RelationCustom] [varchar](50),
[SC_UseTime] [datetime]
)
sqlserver2005好像不支持表类型,不过支持表变量
表变量定义:
@declare @mtTable table(id int, [name] varchar(10))
请发表评论