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

what is self join and why is it required? : Sql dba

1 Answers  


How can we connect an Android App to an Oracle database and use the PL/SQL procedural code?

0 Answers  


Is there any restriction on the use of union in embedded sql?

0 Answers  


Which is better join or inner query?

0 Answers  


How much does sql certification cost?

0 Answers  






What is a trigger ?

11 Answers   Accenture, BirlaSoft,


How do I find sql profiler?

0 Answers  


how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba

0 Answers  


what is heap table? : Sql dba

0 Answers  


What is the difference between Union and Union all. Which is faster.

0 Answers  


wt is the diff b/w greast and max ,least and min? wt is the diff b/w case and decod?

4 Answers   Oracle, TCS, Tecnics,


How can you load multi line records? : aql loader

0 Answers  


Categories