在我的SP中添加新列而不影响结果 [英] add a new column in my SP without effecting the result

查看:63
本文介绍了在我的SP中添加新列而不影响结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个存储过程.当我执行SP时,它会返回一些数据.
现在,我的要求是我想为该SP增加一列,但我选择的表中没有该列,因此我要向该SP中再增加一张表,然后执行SP意味着它'' s对结果的影响.但是我想要相同的结果,并针对要使用的联接显示选定的列.当前,我正在使用左外联接,但在此数据中,右外联接也相同.加入也仅显示公共数据.


如何解决此问题....

谁能帮我解决这个问题...

Hi,


I have a Stored Procedure. when i execute the SP it''s return some data.
Now ,what is my requirement is i want to add one more column for that SP but that column is not available in my selected tables for that i''m adding one more table to that SP.Then i execute the SP means it''s effect on the result.But i want the same result and display the selected column also, for that which join i want to used.Currently i''m using leftouter join but in this data is effected, right outer join also same.inner join also displayed only common data.


How to resolve this issue....

can anyone help me to solve this issue...

推荐答案

如果您在查询的选择列表中添加任何列,但该列必须返回您的结果集中.
您无法在结果集中隐藏列.
If you add any column in select list of query than that column must return in your result set.
You can not hide column in your result set.


这篇关于在我的SP中添加新列而不影响结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆