diff --git a/docs/relational-databases/system-stored-procedures/sp-executesql-transact-sql.md b/docs/relational-databases/system-stored-procedures/sp-executesql-transact-sql.md index 6c8224fa4e6..b40a88fe480 100644 --- a/docs/relational-databases/system-stored-procedures/sp-executesql-transact-sql.md +++ b/docs/relational-databases/system-stored-procedures/sp-executesql-transact-sql.md @@ -221,7 +221,7 @@ EXEC sp_executesql @InsertString, GO ``` -Using `sp_executesql` in this procedure is more efficient than using `EXECUTE` to execute a string. When `sp_executesql` is used, there are only 12 versions of the `INSERT` string that are generated, one for each monthly table. With `EXECUTE`, each `INSERT` string is unique because the parameter values are different. Although both methods generate the same number of batches, the similarity of the `INSERT` strings generated by `sp_executesql` makes it more likely that the query optimizer reuses execution plans. +Using `sp_executesql` in this procedure is more efficient than using `EXECUTE` to execute a string. With `EXECUTE`, each `INSERT` string is unique because the parameter values are different. When `sp_executesql` is used, there is only one `INSERT` string generated for each language, month and year combination. (`DATENAME()` returns different values depending on the value of `LANGUAGE` in the session that is executing the `InsertSales` procedure.) Although both methods generate the same number of batches, the similarity of the `INSERT` strings generated by `sp_executesql` makes it more likely that the query optimizer reuses execution plans. ### C. Use the OUTPUT parameter