Important
Self-managed SingleStore will soon transition from version 9.1 RC to version 10. This new semantic versioning scheme will provide SingleStore with finer control over engine and feature releases that were not possible with the current versioning scheme.
In the interim, SingleStore 9.1 RC can be used to preview, evaluate, and provide feedback on the new and upcoming features in SingleStore 10 prior to its general availability. Ahead of this transition, SingleStore 9.0 is recommended for production workloads, which can later be upgraded to SingleStore 10.
ROLLBACK
On this page
The ROLLBACK command rolls back the open transaction if one exists.
Syntax
ROLLBACK [ WORK ] [ AND [ NO ] CHAIN ] [ [ NO ] RELEASE ]
Remarks
-
[ AND [ NO ] CHAIN ]and[ [ NO ] RELEASE ]are ignored as these options are not currently supported by SingleStore. -
This command must be run on the master aggregator or a child aggregator node (see Node Requirements for SingleStore Commands.
Example
For this example, consider the following Employee table:
|
ID |
Name |
|---|---|
|
30 |
Jim |
|
20 |
Rob |
|
40 |
Rick |
BEGIN;
UPDATE Employee SET Name = "John" WHERE ID = 300;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0 Changed: 0 Warnings: 0Run the SELECT query to verify if the UPDATE is correct:
SELECT * FROM Employee;
+------+-------+
| ID | Name |
+------+-------+
| 30 | Jim |
| 20 | Rob |
| 40 | Rick |
+------+-------+Run ROLLBACK since there were no matching results for the ID and the UPDATE was not successful.
ROLLBACK;
Note: Before the user runs COMMIT or ROLLBACK, only that user can see the updates made after the BEGIN statement was run.
Last modified: