We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8afacf commit 3d0424dCopy full SHA for 3d0424d
sql-queries-11/lock-single-row-mysql/select-for-share.sql
@@ -1,27 +1,27 @@
1
-//First Session
+// First Session
2
START TRANSACTION;
3
SELECT *
4
FROM DEPARTMENT
5
WHERE id=5
6
FOR SHARE;
7
8
-//Second Session
+// Second Session
9
10
11
12
13
14
15
16
17
18
19
FOR UPDATE;
20
21
22
COMMIT;
23
24
25
26
UPDATE DEPARTMENT
27
SET code='MA'
0 commit comments