简体   繁体   English

MS SQL Server中访问与存储过程中的存储查询

[英]Stored Queries in access vs. Stored Procedure in MS SQL Server

Is it correct to say that the Functionality of " stored queries " in MS access is the same with " stored Procedure " in MS SQL Server. 可以肯定地说,MS访问中“ 存储查询 ”的功能与MS SQL Server中的“ 存储过程 ”相同。 Which one improve the Performance more? 哪一个可以更好地提高性能?

A Sub or Function in a module is probably closer to a stored procedure than a query. 模块中的Sub或Function可能比查询更接近存储过程。 You can: 您可以:

  • Execute one or more sql statements. 执行一个或多个sql语句。
  • use flow-control and other logic 使用流控制和其他逻辑
  • interact with objects outside of the database: files, email, execute programs etc. 与数据库之外的对象进行交互:文件,电子邮件,执行程序等。
  • execute/use other sub routines and functions 执行/使用其他子例程和函数

A query has similarities to a view (except a view can't accept paramters and only executes a select statement), but is more like a table user-defined function (Without some of the flow control). 查询与视图具有相似性(除了视图不能接受参数并且仅执行select语句),但更像是表用户定义的函数(没有某些流控制)。

No, an Access query is much more limited than a stored procedure . 不,访问查询比存储过程要受限制得多。 The stored procedure may be better if you are working with an SQL Server back-end and want to do something complicated. 如果您正在使用SQL Server后端并想做一些复杂的事情,则存储过程可能会更好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM