从存储过程中获取选择性列 [英] Get selective columns from a Stored Procedure
本文介绍了从存储过程中获取选择性列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的,
有没有办法让我可以获得SP返回的选择列。
例如
Dear All,
Is there a way through which i can get selective columns returned by a SP.
e.g.
create procedure sample_sp
as
begin
select 1 col1, 2 col2, 3 col3
end
现在当我在后端执行它时,我只需要col2和col3
EXEC sample_sp
这有可能吗????
我不能使用函数而不是SP。
问候,
Gopal
Now when i execute it in the backend, i want only col2 and col3
EXEC sample_sp
Is this possible by any means ????
I can not use function instead of SP.
Regards,
Gopal
推荐答案
只需在sp中进行更改
Just make changes in the sp
create procedure sample_sp
as
begin
select 2 col2, 3 col3
end
这篇关于从存储过程中获取选择性列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文