Why we use stored procedure than Sql statement?

A stored procedure is, as the name suggests, a query stored within the database that returns the results required to create the output you
want. This approach hides the structure of the database and tables from the user, as they just execute the stored procedure and get back a rowset (a series of rows of data) or whatever result the stored procedure is designed to generate. It is also more efficient because the database server can precompile the stored procedure, and reuse the compiled code. In addition, in enterprise-level databases, the administrator can
set access permissions on the tables so that users can only run a stored procedure, and not access the data in the tables directly.

There are also benefits from separating the user interface code (the Web Form) from the data access code when using a stored procedure. Providing that the stored procedure returns the same results, the actual structure of the underlying tables can change as required—without requiring any changes to the pages that access the data.

note : Wrox.ASP.dot.NET.2.0.Visual.Web.Developer.2005.Express.Edition.Starte
          chapter 3

转载于:https://www.cnblogs.com/qishichang/archive/2008/05/20/1203616.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值