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, 2046🔥, 0💬
Popular Posts:
How To Turn on mysql Extension on the PHP Engine in MySQL? The "mysql" API extension is provided as ...
How To Start Instance with a Minimal Initialization Parameter File in Oracle? The sample initializat...
How To Change the Password for Your Own User Account in MySQL? If you want to change the password of...
What Is SQL*Plus in Oracle? SQL*Plus is an interactive and batch query tool that is installed with e...
How To Convert Numeric Expression Data Types using the CONVERT() Function in SQL Server Transact-SQL...