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
Can we use insert statement in function?
How do you break a loop in pl sql?
What are all the different types of indexes?
What is a schema? How is it useful in sql servers?
explain access control lists. : Sql dba
Does sql full backup truncate logs?
What is string join?
what are the advantages of mysql in comparison to oracle? : Sql dba
How do I view tables in mysql?
What is set serveroutput on?
What is data type in database?
Explain the savepoint statement.
Is it possible for a table to have more than one foreign key?
Write a sql select query that only returns each name only once from a table?
Can unique keys be null?