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...

Types of cursor locks and explanation each of them ?

Answer Posted / kalyan dhara

FOR UPDATE and CURRENT OF
---------------
When you issue a SELECT...FOR UPDATE statement, the RDBMS
automatically obtains exclusive row-level locks on all the
rows identified by the SELECT statement, holding the records
“for your changes only” as you move through the rows
retrieved by the cursor. No one else will be able to change
any of these records until you perform a ROLLBACK or a COMMIT.

CURSOR toys_cur IS
SELECT name, manufacturer, preference_level,
sell_at_yardsale_flag
FROM my_sons_collection
WHERE hours_used = 0
FOR UPDATE;

UPDATE table_name
SET set_clause
WHERE CURRENT OF toys_cur ;

OR

DELETE FROM table_name
WHERE CURRENT OF toys_cur ;

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is table in a database?

1110


How do I access sql anywhere database?

1022


How do I truncate a sql log file?

1135


Can there be 2 primary keys in a table?

1043


How to call shell script from pl sql procedure?

1357


How do we use distinct statement? What is its use?

1075


What are field types?

1052


Explain the uses of control file.

1100


What is difference between nchar and nvarchar?

1101


Why we use sql profiler?

1023


how many values can the set function of mysql take? : Sql dba

1037


What is null in pl/sql?

1121


What are all different types of collation sensitivity?

1075


how would you get the current date in mysql? : Sql dba

1017


What are the popular database management systems in the it industry?

1037