我想加入我的程序隔離級別和,我想確認哪一個是正確的格式從下面:存儲過程SQL Server的隔離級別?
嘗試#1 - 設置隔離級別調用存儲過程之前:
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
EXEC [sp_GetProductDetails] 'ABCD','2017-02-20T11:51:37.3178768'
嘗試#2 - 設置存儲過程中的隔離級別:
CREATE PROCEDURE MySP AS
BEGIN
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
BEGIN TRAN
SELECT * FROM MyTable
SELECT * FROM MyTable2
SELECT * FROM MyTable3
COMMIT TRAN
END
請建議。