摘要: 1.声明用户自定义表类型CREATE TYPE [dbo].[pmodelTable] AS TABLE( [pmodel] [varchar](60) NULL --要传入的列)GO2.存储过程中使用自定义表类型create proc P_GetPmidByPmodel(@pmodel pmodelTable readonly --自定义的表类型)asbegin select pmid from V_ProductModel v inner join @pmodel p on v.pmodel=p.pmodelendgo3.测试效果declare @table as pm... 阅读全文
posted @ 2013-05-02 09:46 划破黑夜 阅读(269) 评论(0) 推荐(0) 编辑