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
What is the use of function "module procedure" in pl/sql?
What is the difference between function and procedure in pl/sql?
what is a database? : Sql dba
What are expressions?
Explain commit, rollback and savepoint.
how to return query output in html format? : Sql dba
Is sql a microsoft product?
What are the different types of sql commands?
Explain the difference between rename and alias?
How you can copy a file to file content and file to pl/sql table in advance pl/sql?
What are tuples in sql?
Where not exists in sql?
What is %type in sql?
What is oracle sql developer?
What is basic structure of pl sql?