就是定义一个CREATE TYPE [dbo].[InStoreInfo] AS TABLE(
[GoodsID] [bigint] NOT NULL,
[GoodsName] [nvarchar](64) NOT NULL,
[RequestInStoreNum] [int] NOT NULL,
[RealInStoreNum] [int] NOT NULL,
[ProductDate] [smalldatetime] NOT NULL
)
GO
游标操作就可以了,如果性能要求不高的话:
示例:
DECLARE CustomerCursor CURSOR FOR
SELECT acct_no,name,balance
FROM customer
WHERE PRovince="北京";
....................
具体看文档就可以学会,很简单
祝福你好运。