SQL - DROP CLASS

Removes a class from the schema.

Syntax

DROP CLASS <class> [IF EXISTS] [ UNSAFE ]
  • <class> Defines the class you want to remove.
  • IF EXISTS (since v 2.2.13) Drops the class only if it exists (does nothing if it doesn't)
  • UNSAFE Defines whether the command drops non-empty edge and vertex classes. Note, this can disrupt data consistency. Be sure to create a backup before running it.

NOTE: Bear in mind, that the schema must remain coherent. For instance, avoid removing calsses that are super-classes to others. This operation won't delete the associated cluster.

Examples

  • Remove the class Account:

    orientdb> DROP CLASS Account
    

For more information, see

results matching ""

    No results matching ""