Types of cursor locks and explanation each of them ?
Answers were Sorted based on User's Feedback
Answer / mehul patel
acLockPesimistic - locks the row when it read it and hold
the lock still updates it.
adLockOptimistic - locks the row whenit updates it.
adLockOptimistic - locks the row at the time it updates it.
adlockforwardonly - readonly.
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / 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 |
Why are cursors used?
If you have to declare procedure1,procedure2 in package specification and if you have to declare procedure1,procedure2 and procedure3 in package body? is it compilation or not and execute or not? what type of error is given please
How do I run a sql script?
What is restrict in sql?
What is form and report?
Can a select statement fire a trigger?
How do you exit in sql?
What is sql analyzer?
What is clustered index in sql?
Types of locks in database ?
What is the use of triggers?
Mention what is the use of function "module procedure" in pl/sql?