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 use of file param in imp command?

1136


Can a formula column be obtained through a select statement ?

2286


How to write numeric literals in oracle?

1148


How to define a procedure inside another procedure?

982


How to use "while" statements in oracle?

1264


In oracle there is column command, how will you explain that?

996


What is raw datatype in oracle?

1085


Give the different types of rollback segments.

993


How to start instance with a minimal initialization parameter file?

1006


What is oracle in java?

928


Explain the use of ignore option in imp command.

994


What is flashback in Oracle?

988


What is a relational database management system?

1087


Is insert autocommit in oracle?

1039


11. Display the client number and name and the client number and name of the person who referred that client.

2295