You’re probably looking forwith (updlock, holdlock)
. This will make a select
grab an exclusive
lock, which is required for updates, instead of a shared
lock. The holdlock
hint tells SQL Server to keep the lock until the transaction ends.
FROM TABLE_ITEM with (updlock, holdlock)
Related Contents:
- Confused about UPDLOCK, HOLDLOCK
- Optimistic vs. Pessimistic locking
- Only inserting a row if it’s not already there
- The order of a SQL Select statement without Order By clause
- Query to list number of records in each table in a database
- Storing a file in a database as opposed to the file system?
- Multiple Indexes vs Multi-Column Indexes
- Preferred Method of Storing Passwords In Database
- Using a sort order column in a database table
- Create a view with ORDER BY clause
- Oracle: is there a tool to trace queries, like Profiler for sql server? [closed]
- What columns generally make good indexes?
- What does ‘COLLATE SQL_Latin1_General_CP1_CI_AS’ do?
- How to do version control for SQL Server database?
- How to create a yes/no boolean field in SQL server?
- Select / Insert version of an Upsert: is there a design pattern for high concurrency?
- How to determine total number of open/active connections in ms sql server 2005
- What is the Oracle equivalent of SQL Server’s IsNull() function?
- Best way to store time (hh:mm) in a database
- How to check if a database exists in SQL Server?
- How to migrate a PostgreSQL database into a SQLServer one?
- What resources exist for Database performance-tuning? [closed]
- How can I run just the statement my cursor is on in SQL Server Management Studio?
- What is the point of “Initial Catalog” in a SQL Server connection string?
- Executing set of SQL queries using batch file?
- SQL Server, the misleading XLOCK & optimizations
- Tool for Scripting Table Data
- Database design: Calculating the Account Balance
- Database that can handle >500 millions rows
- Using SQL Server as a DB queue with multiple clients
- Check if table exists in SQL Server
- What is the significance of 1/1/1753 in SQL Server?
- Which are more performant, CTE or temporary tables?
- SQL – How to store and navigate hierarchies?
- How do you view ALL text from an ntext or nvarchar(max) in SSMS?
- How can I force entity framework to insert identity columns?
- Hidden Features of SQL Server
- EF5: Cannot attach the file ‘{0}’ as database ‘{1}’
- Do I really need to use “SET XACT_ABORT ON”?
- Export table from database to csv file
- Is it possible to force row level locking in SQL Server?
- How to display table data more clearly in oracle sqlplus
- Creating audit triggers in SQL Server
- Why does select SCOPE_IDENTITY() return a decimal instead of an integer?
- What are named pipes?
- Why the SQL Server ignore the empty space at the end automatically?
- How can I know when SQL Full Text Index Population is finished?
- Installing Oracle 32-bit Client on Windows Server Already Running 64-bit Oracle Database Server
- SELECT INTO a table variable in T-SQL
- Removing the remembered login and password list in SQL Server Management Studio