About this question
Here I'm locking several tables. BEGIN TRANSACTION SELECT Top 0 Null FROM TableA with (holdlock, tablockx) SELECT Top 0 Null FROM TableB with (holdlock, tablockx) ... I want to suppress results for it in order to focus on real script results. Is there an elegant way to xlock a table without getting a result set?
What is sql server lock table?