Collections:
Retrieve the Count of Updated Rows in Oracle
How To Retrieve the Count of Updated Rows in Oracle?
✍: FYIcenter.com
After running an UPDATE statement, the database server returns a count of updated rows. You can retrieve this count from a special predefined variable called SQL%ROWCOUT, as shown in the following tutorial:
CREATE TABLE emp_temp AS SELECT * FROM employees; BEGIN UPDATE emp_temp SET salary = salary * 1.05 WHERE salary < 5000; DBMS_OUTPUT.PUT_LINE('# of rows updated: ' || SQL%ROWCOUNT); END; / # of rows updated: 49
⇐ Invoke Built-in Functions in PL/SQL in Oracle
2018-09-13, 2174🔥, 0💬
Popular Posts:
How To Install PHP on Windows in MySQL? The best way to download and install PHP on Windows systems ...
How to set database to be READ_ONLY in SQL Server? Databases in SQL Server have two update options: ...
How To Break Query Output into Pages in MySQL? If you have a query that returns hundreds of rows, an...
Where to find answers to frequently asked questions on PHP Connections and Query Execution for MySQL...
How To Get a List of All Tables with "sys.tables" View in SQL Server? If you want to see the table y...