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

14,546

Solution 1

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

The only vaguely matching thing is set feedback off as mentioned by BigMike

Solution 2

SET FEEDBACK OFF at SQL*plus prompt.

For official docs please refer to this

Share:
14,546
Luke Girvin
Author by

Luke Girvin

Web developer (C#, JavaScript, SQL Server, Oracle), Emacs user, and Norwich City fan.

Updated on June 21, 2022

Comments

  • Luke Girvin
    Luke Girvin almost 2 years

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

    From the SQL Server documentation:

    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.