-
Notifications
You must be signed in to change notification settings - Fork 0
/
13_80_isolationlevels.sql
45 lines (34 loc) · 1.09 KB
/
13_80_isolationlevels.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
---SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
SELECT PersonId, FullName, PreferredName, PhoneNumber
FROM Application.People
WHERE FullName = 'Kayla Woodcock'
AND IsEmployee = 1;
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
SELECT PersonId, FullName, PreferredName, PhoneNumber
FROM Application.People
WHERE FullName = 'Kayla Woodcock'
AND IsEmployee = 1;
SELECT PersonId, FullName, PreferredName, PhoneNumber
FROM Application.People
WHERE PersonId = 3;
SELECT PersonId, FullName, PreferredName, PhoneNumber
FROM Application.People
WHERE PersonId = 16;
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
BEGIN TRAN
SELECT PersonId, FullName, PreferredName, PhoneNumber
FROM Application.People
WHERE PreferredName = 'Kayla'
SELECT PersonId, FullName, PreferredName, PhoneNumber
FROM Application.People
WHERE PersonID = 3;
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
BEGIN TRAN
UPDATE Application.People
SET PhoneNumber = '1029232'
WHERE PersonID = 3261;
UPDATE Application.People
SET PreferredName = 'Kayla'
WHERE PersonID = 3261;
ROLLBACK TRAN