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 |
i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5
What is left join in postgresql?
How do I view stored procedures?
Differences between UNIQUE and DISTINCT in select statements
26 Answers ABS, DELL, Deloitte, Hewitt, Oracle, Verinon Technology Solutions, Wipro,
How to export the table data (this table having 18 million records) to .csv file. Please tell me is there any faster way to export the data.
Explain the usage of WHERE CURRENT OF clause in cursors ?
What is pls integer?
Explain isolation levels. : Transact sql
What is a full join sql?
what are all types of user defined functions? : Sql dba
What are types of exception?
Can I create table without primary key?