Posts

Removing all records from an OrientDB collection

If you want to delete all records from an OrientDB collection, the best way to do this is using the OrientDB TRUNCATE Class command. To use the Truncate command in a Java application, you can use the following code:

 

OrientDB drop column

To use the equivalent of a Drop Column in OrientDB, you can use OrientDB’s DROP PROPERTY.

DROP PROPERTY <class>.<property>

This however doesn’t remove the values, it only updates the schema, if you have one. To also remove the values, use the following command:

UPDATE <class> REMOVE <property> WHERE <condition>

Hope that helps!