Types of cursor locks and explanation each of them ?

Answers were Sorted based on User's Feedback



Types of cursor locks and explanation each of them ?..

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

Types of cursor locks and explanation each of them ?..

Answer / rtr

a

Is This Answer Correct ?    4 Yes 2 No

Types of cursor locks and explanation each of them ?..

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

Post New Answer

More SQL PLSQL Interview Questions

Why are cursors used?

0 Answers  


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

1 Answers  


How do I run a sql script?

0 Answers  


What is restrict in sql?

0 Answers  


What is form and report?

0 Answers  


Can a select statement fire a trigger?

0 Answers  


How do you exit in sql?

0 Answers  


What is sql analyzer?

0 Answers  


What is clustered index in sql?

0 Answers  


Types of locks in database ?

8 Answers   HCL, TCS, Tieto,


What is the use of triggers?

0 Answers  


Mention what is the use of function "module procedure" in pl/sql?

0 Answers  


Categories