Lock Row of a Table using SQL

How to lock a particular row of a table using SQL?

Questions by haritha2212

Showing Answers 1 - 3 of 3 Answers

INSERT , UPDATE, DELETE operations implicity lock rows of a table that satisfies the condition.

Explicitly you may lock a table using for update of as follows

SELECT * FROM EMP
WHERE EMPNO = 7369
FOR UPDATE OF SAL NOWAIT

It will lock single row of emp table having employee number 7369.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions