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

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

2337


What happens to the current transaction if the session is killed?

988


How to find the duplicate rows count from employees table in oracle?

1090


How do you bind variables in oracle?

980


Can we insert data in view oracle?

1019


what is the use of triggers in Java program? I mean where do we use triggers in Java programming?

2183


How to retrieve the count of updated rows?

1126


Briefly explain what is literal? Give an example where it can be used?

1037


When do you get a .pll extension in oracle? Explain its importance

1039


How to create id with auto_increment on oracle?

989


What is an oracle function?

1160


1) Does oracle have any table which contain all the exceptions and it's code internally?

1749


What is index-organized table in Oracle?

1069


WHAT IS ecc 6.0

2147


How to convert raw data type into text in oracle? Explain

993