Lock only a row in insert command sql server
Make sure you have an index on the Nome column, allowing SQL Server to &quot;bypass&quot; (not having to read) those rows you exclude in your WHERE clause. I.e.
CREATE INDEX yourindexname ON Teste_Nolock(Nome)