DROP EDGE drops an edge type with the given name in a graph space.
An edge can have only one edge type. After you drop it, the edge CANNOT be accessed. The edge will be deleted in the next compaction.
This operation only deletes the Schema data. All the files or directories in the disk will not be deleted directly until the next compaction.
- Running the
DROP EDGEstatement requires some privileges for the graph space. Otherwise, NebulaGraph throws an error.
- Before you drop an edge type, make sure that the edge type does not have any indexes. Otherwise, the conflict error (
[ERROR (-1005)]: Conflict!) will be returned. To drop an index, see DROP INDEX.
DROP EDGE [IF EXISTS] <edge_type_name>
IF NOT EXISTS: Detects if the edge type that you want to drop exists. Only when it exists will it be dropped.
edge_type_name: Specifies the edge type name that you want to drop. You can drop only one edge type in one statement.
nebula> CREATE EDGE IF NOT EXISTS e1(p1 string, p2 int); nebula> DROP EDGE e1;
Last update: August 11, 2022