سؤال

Using NOLOCK in UPDATE statement:

Both the below queries are working fine.

UPDATE ml
SET CreationUserId = 'system'
FROM mst_login AS ml WITH (NOLOCK)
WHERE LoginId = 300


UPDATE mst_login
SET CreationUserId = 'system'
FROM mst_login WITH (NOLOCK)
WHERE LoginId = 300

What is the difference (in terms of performance) between these 2 ways of using NOLOCK in update statement?

هل كانت مفيدة؟

المحلول

There is no difference. One is just using a table alias.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top