如何发送两个不同的列名来自storeprocedure到不同的表? [英] How to send two different column names comes from to different tables from storeprocedure to ?
本文介绍了如何发送两个不同的列名来自storeprocedure到不同的表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hiii,
选择 Id,DescName 来自 A
其中 CompanyId = @ CompanyId
选择 TypeName,Id TypeId 来自 B
where CompanyId = @ CompanyId
这是我从storeprocedure返回并指定列表中的内容类文件。
但是在列表中我只得到第一个表的两列,但是不是来自表B. .. div class =h2_lin>解决方案
查看此链接
T-SQL中的存储过程和多个结果集 [ ^ ]
Hiii,
select Id,DescName from A
where CompanyId=@CompanyId
select TypeName,Id as TypeId from B
where CompanyId=@CompanyId
this is what i am returning from storeprocedure and assgining to list in my class file.
but in list i am getting only two columns of first table that is A but not from table B..
解决方案
Check this link
Stored procedures and multiple result sets in T-SQL[^]
这篇关于如何发送两个不同的列名来自storeprocedure到不同的表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文