Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 1.05 KB

SQL-Drop-Class.md

File metadata and controls

38 lines (25 loc) · 1.05 KB
search
keywords
SQL
DROP CLASS
delete
drop
class

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