In this part, you will figure out how to move back the un-submitted exchange through the OrientDB order line interface.
The accompanying assertion is the fundamental sentence structure of the Rollback data set order.
ROLLBACK
Note − You can utilize this order simply in the wake of interfacing with a specific data set and subsequent to starting the exchange.
Example
In this model, we will utilize a similar data set named 'demo' that we made in the past part. We will see the activity of rollback exchange and store a record utilizing exchanges.
To start with, start the exchange utilizing the accompanying BEGIN order.
orientdb {db = demo}> BEGIN
At that point, embed a record into a representative table with the qualities id = 12 and name = satish.P utilizing the accompanying order.
orientdb> INSERT INTO employee (id, name) VALUES (12, 'satish.P')
You can utilize the accompanying order to recover the records from the Employee table.
orientdb> SELECT FROM employee WHERE name LIKE '%.P'
On the off chance that this order is executed effectively, you will get the accompanying yield.
---+-------+--------------------
# | ID | name
---+-------+--------------------
0 | 12 | satish.P
---+-------+--------------------
1 item(s) found. Query executed in 0.076 sec(s).
You would now be able to utilize the accompanying order to Rollback this exchange.
orientdb> ROLLBACK
Check the select question again to recover a similar record from the worker table.
orientdb> SELECT FROM employee WHERE name LIKE '%.P'
On the off chance that the rollback is executed effectively, you will get 0 records found in the yield.
0 item(s) found. Query executed in 0.037 sec(s).