Shorten Record order is utilized to erase the estimations of a specific record.
The accompanying assertion is the essential punctuation of the Truncate order.
TRUNCATE RECORD <rid>*
Where <rid>* demonstrates the Record ID to shorten. You can utilize numerous Rids isolated by comma to shorten different records. It restores the quantity of records shortened.
Example
Allow us to consider a similar Customer table that we have utilized in the past section.
Sr.No. Name Age
1 Satish 25
2 Krishna 26
3 Kiran 29
4 Javeed 21
5 Raja 28
Attempt the accompanying inquiry to shorten the record having Record ID #11:4.
Orientdb {db = demo}> TRUNCATE RECORD #11:4
In the event that the above inquiry is executed effectively, you will get the accompanying yield.
Truncated 1 record(s) in 0.008000 sec(s).
To check the record of Customer table you can utilize the accompanying inquiry.
Orientdb {db = demo}> SELECT FROM Customer
In the event that the above inquiry is executed effectively, you will get the accompanying yield.
----+-----+--------+----+-------+----
# |@RID |@CLASS |id |name |age
----+-----+--------+----+-------+----
0 |#11:0|Customer|1 |satish |25
1 |#11:1|Customer|2 |krishna|26
2 |#11:2|Customer|3 |kiran |29
3 |#11:3|Customer|4 |javeed |21
----+-----+--------+----+-------+----