Transaction lock in sql

I am assuming you are using SQL Server. You can use the WITH NOLOCK hint in your select statement, so the read goes through. However, you should be aware that it is a dirty read. Since the update statement is changing the data and the changes may or may not have been committed, the result of the read (select) statement can be problematic.

Here is a link to a page with more details and simple examples

Browse More Popular Posts

Leave a Comment