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 65c86f3 commit 1666c0bCopy full SHA for 1666c0b
sql-queries-11/lock-single-row-mysql/select-for-update.sql
@@ -2,13 +2,13 @@
2
START TRANSACTION;
3
SELECT *
4
FROM DEPARTMENT
5
-WHERE id=5
+WHERE id = 5
6
FOR UPDATE;
7
8
// Second Session
9
10
11
12
FOR SHARE;
13
14
// First Session
@@ -17,8 +17,8 @@ COMMIT;
17
18
19
UPDATE DEPARTMENT
20
-SET code='TEMP'
21
-WHERE id<5 OR id>5;
+SET code = 'TEMP'
+WHERE id < 5 OR id > 5;
22
23
24
COMMIT
0 commit comments