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, 3364🔥, 0💬
Popular Posts:
How to download and install SQL Server 2005 Sample Scripts in SQL Server? If you want to learn from ...
How To Download Oracle Database 10g XE in Oracle? If you want to download a copy of Oracle Database ...
How to put statements into a statement block in SQL Server Transact-SQL? You can put statements into...
How To Find Out What Privileges a User Currently Has in Oracle? Privileges granted to users are list...
Where to find MySQL database server tutorials? Here is a collection of tutorials, tips and FAQs for ...