SET FEEDBACK ONLY SQL_ID in SQL* Plus

 Watch the Video Version on this topic)

Let's discuss about 2 option for SET FEEDBACK command in SQL*Plus.

SET FEEDBACK ONLY

  • Returns the number of rows selected by a query without displaying data.
  • This option is useful if you want to just get the row count of your SQL query, but do not want to print a large set of rows.

Example:
SQL> SET FEEDBACK ONLY
SQL> SELECT * from employees;

107 rows selected.

SQL>

SET FEEDBACK ONLY SQL_ID
  • Returns the the number of rows selected (No Data) and the SQL_ID for the SQL or PL/SQL statements that are executed. 
  • The sql_id will be assigned to the predefined variable _SQL_ID.
  • The sql_id can be useful for DB administrator for performance troubleshooting.

Example:

SQL> SET FEEDBACK ONLY SQL_ID
SQL> SELECT * from employees;

107 rows selected.

SQL_ID: a0fq6m2g5u397
SQL>

=======================================================================
** Email to info@shreyantech.com to get the Tip of the Day in your mailbox.

No comments:

Post a Comment