Would it be wise to use ROWLOCK in an insert statement that copies large amounts of data and inserts them into the same table?
Ex)
INSERT INTO TABLE with (rowlock) (id, name)
SELECT newid, name
FROM TABLE with (nolock)
WHERE id = 1
Does anyone have any recommendations on how to improve this statement, as I see when SQL Server gets busy, it will complete the Timeout query returned for SQL Server.
source
share