如果在VIEW的select中包含NOLOCK,NOLOCK是否会向下传播到视图中连接的表中?如果没有,锁定VIEW的目的是什么?
示例查看代码:
CREATE VIEW [my_custom_view] AS SELECT a1.[column_a],a1.[column_b],a1.[column_c],a1.[column_d] FROM [table_a] a1 JOIN [table_b] b1 ON b1.[column_a] = a1.[column_b]
和NOLOCK声明:
SELECT [column_a],[column_b] FROM [my_custom_view] NOLOCK