- OrientDB - Console Modes
- OrientDB - Data Types
- OrientDB - Basic Concepts
- OrientDB - Installation
- OrientDB - Overview
- OrientDB - Home
OrientDB Database Commands
- OrientDB - Drop Database
- OrientDB - Optimize Database
- OrientDB - Rollback Database
- OrientDB - Commit Database
- OrientDB - Import Database
- OrientDB - Export Database
- OrientDB - Config Database
- OrientDB - Release Database
- OrientDB - Freeze Database
- OrientDB - List Database
- OrientDB - Info Database
- OrientDB - Disconnect Database
- OrientDB - Connect Database
- OrientDB - Restore Database
- OrientDB - Backup Database
- OrientDB - Alter Database
- OrientDB - Create Database
OrientDB Record Commands
- OrientDB - Delete Record
- OrientDB - Truncate Record
- OrientDB - Update Record
- OrientDB - Export Record
- OrientDB - Reload Record
- OrientDB - Load Record
- OrientDB - Display Records
- OrientDB - Insert Record
OrientDB Class Commands
OrientDB Cluster Commands
- OrientDB - Drop Cluster
- OrientDB - Truncate Cluster
- OrientDB - Alter Cluster
- OrientDB - Create Cluster
OrientDB Property Commands
OrientDB Vertex Commands
OrientDB Edge Commands
OrientDB Advanced Concepts
- OrientDB - Studio
- OrientDB - Security
- OrientDB - Upgrading
- OrientDB - Performance Tuning
- OrientDB - Logging
- OrientDB - Caching
- OrientDB - Hooks
- OrientDB - Transactions
- OrientDB - Indexes
- OrientDB - Sequences
- OrientDB - Functions
OrientDB Interfaces
OrientDB Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
OrientDB - Delete Vertex
Delete Vertex command is used to remove vertices from the database. While deleting, it checks and maintains the consistency with the edges and removes all cross-references (with the edges) to the deleted vertex.
The following statement is the basic syntax of Delete Vertex Command.
DELETE VERTEX <vertex> [WHERE <conditions>] [LIMIT <MaxRecords>>] [BATCH <batch-size>]
Following are the details about the options in the above syntax.
<vertex> − Defines the vertex that you want to remove, using its Class, Record ID, or through a sub-query.
WHERE − Filters condition to determine which records the command removes.
LIMIT − Defines the maximum number of records to be removed.
BATCH − Defines how many records the command removes at a time, allowing you to break large transactions into smaller blocks to save on memory usage.
Example
Try the following command to learn how to delete single vertex or multiple vertices.
Execute the following command to remove the vertex ‘#14:1’.
orientdb> DELETE VERTEX #14:1
If the above command is executed successfully, you will get the following output.
Delete record(s) 1 in 0.005000 sec(s)
Execute the following command to remove all vertices from the class ‘Customer’ marked with the property ‘isSpam’.
orientdb> DELETE VERTEX Customer WHERE isSpam = TRUE
If the above command is executed successfully, you will get the following output.
Delete record(s) 3 in 0.005000 sec(s)Advertisements