Home >Backend Development >PHP Tutorial >Using Set NoCount On_PHP tutorial when writing stored procedures

Using Set NoCount On_PHP tutorial when writing stored procedures

WBOY
WBOYOriginal
2016-07-13 17:02:13944browse

Using SET NOCOUNT ON
By default, the stored procedure will return the number of rows affected by each statement in the procedure. If you do not need this information in your application (most applications do not), use the SET NOCOUNT ON statement in the stored procedure to terminate this behavior. Depending on the number of row-affecting statements contained in the stored procedure, this will remove one or more round-trips between the client and server. Although this is not a big problem, it can negatively impact the performance of high-traffic applications.
create procedure test_MyStoredProc @param1 int
as
set nocount on


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631090.htmlTechArticleUse SET NOCOUNT ON By default, the stored procedure will return the number of rows affected by each statement in the procedure. If you don't need to use the information in your application (most applications don't...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn