Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Retrieve the Count of Updated Rows
How To Retrieve the Count of Updated Rows? - Oracle DBA FAQ - Working with Database Objects in PL/SQL
✍: 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
2007-04-27, 7394👍, 0💬
Popular Posts:
How do we enable SQL Cache Dependency in ASP.NET 2.0? Below are the broader steps to enable a SQL Ca...
WHat will be the result of the following code? #define TRUE 0 // some code while (TRUE) { // some co...
How To Create Nested Tables? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells You can cr...
What Are Data Pump Export and Import Modes? - Oracle DBA FAQ - Loading and Exporting Data Data pump ...
Can Java object be locked down for exclusive use by a given thread? Yes. You can lock an object by p...