与 SQL Server 的 SET NOCOUNT ON 等效的 Oracle 是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10720751/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 00:50:06  来源:igfitidea点击:

What is the Oracle equivalent of SQL Server's SET NOCOUNT ON?

sqlsql-serveroracleplsql

提问by Luke Girvin

What is the Oracle equivalent of SQL Server's SET NOCOUNT ON?

与 SQL Server 的 SET NOCOUNT ON 等效的 Oracle 是什么?

From the SQL Server documentation:

SQL Server 文档

SET NOCOUNT ON... Stops the message that shows the count of the number of rows affected by a Transact-SQL statement or stored procedure from being returned as part of the result set...

For stored procedures that contain several statements that do not return much actual data, or for procedures that contain Transact-SQL loops, setting SET NOCOUNT to ON can provide a significant performance boost, because network traffic is greatly reduced.

SET NOCOUNT ON... 停止显示受 Transact-SQL 语句或存储过程影响的行数计数的消息作为结果集的一部分返回...

对于包含多个不返回太多实际数据的语句的存储过程,或者对于包含 Transact-SQL 循环的过程,将 SET NOCOUNT 设置为 ON 可以显着提高性能,因为网络流量大大减少。

采纳答案by a_horse_with_no_name

There is no equivalent in Oracle when set nocount onis used inside a stored procedure, simply because it's not necessary to do (inside a procedure or function).

set nocount on存储过程中使用时,Oracle 中没有等效项,仅仅是因为它没有必要执行(在过程或函数中)。

The only vaguely matching thing is set feedback offas mentioned by BigMike

唯一模糊匹配的东西是set feedback offBigMike 提到的

回答by BigMike

SET FEEDBACK OFFat SQL*plus prompt.

SET FEEDBACK OFF在 SQL*plus 提示符下。

For official docs please refer to this

有关官方文档,请参阅