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 |
Can we change the table name in sql?
Why are cursors used?
when a procedure /package is getting invalidated?
What is procedure function?
Explain correlated query work?
how to insert values like 10:10:00,30:25:00 etc.into table after insert how can i sum the above insert values to get the result as 40:35:00
While inserting/updating million of records into a database table, how do I came to know how many records has been inserted or updated successfully so far?
What is java sql package?
i have a table with column sno with 30 records. i want to update this column by item by item in asp.net. i wantto enter new values into that from 1 to 30 how is it possible with backend c#
What is lexical units in pl sql?
What are the disadvantages of file system?
Is sql port 1433 encrypted?