YMatrix
Quick Start
Connecting
Benchmarks
Deployment
Data Usage
Manage Clusters
Upgrade
Global Maintenance
Expansion
Monitoring
Security
Best Practice
Technical Principles
Data Type
Storage Engine
Execution Engine
Streaming Engine(Domino)
MARS3 Index
Extension
Advanced Features
Advanced Query
Federal Query
Grafana
Backup and Restore
Disaster Recovery
Graph Database
Introduction
Clauses
Functions
Advanced
Guide
Performance Tuning
Troubleshooting
Tools
Configuration Parameters
SQL Reference
The REMOVE clause deletes properties from vertices and edges.
A REMOVE clause that is not followed by another clause is terminal. When a Cypher query ends with a terminal clause, the cypher() function call returns no result rows. However, the cypher() function still requires a column definition list. When the query ends in a terminal clause, define a dummy column in the column definition list — the variable will not yield any data.
Cypher does not support storing NULL as a property value. Instead, a property is considered absent when no value is assigned. Therefore, removing a property from a vertex or edge is accomplished using REMOVE.
SELECT *
FROM cypher('graph_name', $$
MATCH (andres {name: 'Andres'})
REMOVE andres.age
RETURN andres
$$) AS (andres agtype);
Returns the vertex with the age property removed.
| andres |
|---|
{id: 3; label: 'Person'; properties: {name: "Andres"}}::vertex |
| 1 row returned |