GeekInterview.com
Series: Subject:
Question: 54 of 234

Lock Row of a Table using SQL

How to lock a particular row of a table using SQL?
Asked by: haritha2212 | Member Since May-2008 | Asked on: May 31st, 2008

View all questions by haritha2212

Showing Answers 1 - 1 of 1 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.

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.