Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

After update how do u know how many records got updated

Answer Posted / svj

Using SQL Cursor Attribute,'SQL%ROWCOUNT' which gives
no.of rows affected by the most recentSQL statement (an
integer value), one can know no.of records got updated.

For Example :

VARIABLE rows_updated VARCHAR(30)
DECALRE
v_dept_no departments.department_id%TYPE := 20
BEGIN
UPDATE employees
SET salary = salary + 1000
WHERE department_id = v_dept_no;
: rows_updated := (SQL%ROWCOUNT || 'rows updated.');
END;
/
PRINT rows_updated

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the cache hit ratio, what impact does it have on performance of an Oracle database and what is involved in tuning it?

2177


Is it possible to center an object horizontally in a repeating frame that has a variable horizontal size ?

2423


How to check your oracle database 10g xe installation?

1048


What does sharding mean?

1052


What is a tns service name?

1056


What is oracle rowcount?

1145


What is the best way to do multi-row insert in oracle?

1107


How to build data dictionary view an new database?

1052


How to write a query with a right outer join in oracle?

1222


What would you do with an in-doubt distributed transaction?

2046


How to view the tablespaces in the current database?

1026


How to retrieve the count of updated rows?

1192


Explain the use of online redo log files in oracle.

1077


How can we delete duplicate rows in a table?

1037


what is the scenario where you take the database to NoArchivelog mode?

2376