为什么我们使用视图,可以通过在SP中编写选择查询来执行相同的操作 [英] Why do we use views , same operation can be performed by writing select query in SP

查看:58
本文介绍了为什么我们使用视图,可以通过在SP中编写选择查询来执行相同的操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一个查询,视图用于向用户显示表的一部分。这可以通过在View的定义中编写一个select语句来实现。

但SP也可以帮助实现相同的结果,所以我们为什么要创建一个视图。



任何人都可以指导我。

解决方案

这是非常有趣的explonation:视图与存储过程 [ ^ ]


您好,



请参阅以下链接。它可能对你有所帮助



http://stackoverflow.com/questions/5194995/what-is-the-difference-between-a-stored-procedure-and-a-view [< a href =http://stackoverflow.com/questions/5194995/what-is-the-difference-between-a-stored-procedure-and-a-viewtarget =_ blanktitle =New Window> ^ ]

Hi All,

I have a query, Views are use to show only a part of a table to the user. This can be achieved by writing a select statement in definition of View .
But SP also can help to achieve the same result so why should we create a view.

Can any one guide me.

解决方案

Here is quite interesting explonation: Views vs Stored Procedures[^]


Hi,

Please see the below link. It might be help you

http://stackoverflow.com/questions/5194995/what-is-the-difference-between-a-stored-procedure-and-a-view[^]


这篇关于为什么我们使用视图,可以通过在SP中编写选择查询来执行相同的操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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