如何为现有存储过程创建视图 [英] how to creata a view for existing stored procedure

查看:135
本文介绍了如何为现有存储过程创建视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建现有存储过程的视图

how to creata a view for existing stored procedure

推荐答案

您不能在select语句中使用存储过程,这是您要尝试使用的具有基于现有存储过程的视图。



你可以做的是创建一个用户定义的函数,并在存储过程和视图中使用该函数。
You cannot use a stored procedure in a select statement, which is what you would be trying to do with having a view based on an existing stored procedure.

What you can do is create a user defined fuction and use that function in the stored procedure and in the view.


看看这里:从存储过程创建视图 [ ^ ]。在引用页面的底部,您将找到解决方案;)
Have a look here: create view from stored procedure[^]. On the bottom of referenced page, you'll find a solution ;)


这篇关于如何为现有存储过程创建视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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