问题描述
我的问题的目的是从
应用程序访问这些技术。我开发了应用程序和数据库。使用
Microsoft C#.NET和Microsoft SQL Server 2000生产和2005测试
环境。
目的是什么一个视图,如果我可以从视图中复制vode
并将其放入存储过程?
我应该从存储过程访问视图吗?
我应该使用视图来获取信息吗?和存储过程
插入,更新和删除?
这两者之间有什么性能差异?
感谢您提供任何和所有信息。
SBProgrammer
The purpose for my questions is accessing these technologies from
applications. I develop both applications and databases. Working with
Microsoft C#.NET and Microsoft SQL Server 2000 Production and 2005 Test
Environments.
What is the purpose of a view if I can just copy the vode from a view
and put it into a stored procedure?
Should I be accessing views from stored procedures?
Should I use views to get information? and Stored Procedures for
Inserts, Updates and Deletes?
What are the performance differences between the two?
Thank you for any and all information.
SBProgrammer
推荐答案
视图和存储过程之间的区别正是
名称所说的。通过视图,您可以定义一个select-query,用于从一个或多个表(存储的
select-statement)中检索
特定信息。存储过程可以做更多:它可以运行多个sql命令
,具有control-of-flow语句并接受
参数。另外,giyf:
Stevel
The difference between a view and a stored procedure is exactly what the
names say. With a view, you can define a select-query that retrieves
specific information from one or more tables (a stored
select-statement). A stored procedure can do much more: it can run
multiple sql-commands, has control-of-flow statements and accepts
parameters. Also, giyf:
http://www.google.be/search?q=view+vs+stored+procedure
Stevel
SBProgrammer,
天前。这是Google上文章的链接(警告 - 长URL,
可能会换行)
-
Hugo Kornelis,SQL Server MVP
Hi SBProgrammer,
I wrote about the differences between stored procedures and views ten
days ago. Here''s a link to the article on Google (warning - long URL,
might wrap)
http://groups.google.com/group/micro...cc4092b8603807
--
Hugo Kornelis, SQL Server MVP
这篇关于视图与存储过程有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!