Clauses
Reading clauses
These comprise clauses that read data from the database.
The flow of data within a Cypher® query is an unordered sequence of maps with key-value pairs — a set of possible bindings between the variables in the query and values derived from the database. This set is refined and augmented by subsequent parts of the query.
| Clause | Description | 
|---|---|
| Specify the patterns to search for in the database. | |
| Specify the patterns to search for in the database while using  | 
Projecting clauses
These comprise clauses that define which expressions to return in the result set.
The returned expressions may all be aliased using AS.
| Clause | Description | 
|---|---|
| Defines what to include in the query result set. | |
| Allows query parts to be chained together, piping the results from one to be used as starting points or criteria in the next. | |
| Expands a list into a sequence of rows. | 
Reading sub-clauses
These comprise sub-clauses that must operate as part of reading clauses.
| Sub-clause | Description | 
|---|---|
| Adds constraints to the patterns in a  | |
| An existential sub-query used to filter the results of a  | |
| A sub-clause following  | |
| Defines from which row to start including the rows in the output. | |
| Constrains the number of rows in the output. | 
Reading hints
These comprise clauses used to specify planner hints when tuning a query. More details regarding the usage of these — and query tuning in general — can be found in Planner hints and the USING keyword.
| Hint | Description | 
|---|---|
| Index hints are used to specify which index, if any, the planner should use as a starting point. | |
| Index seek hint instructs the planner to use an index seek for this clause. | |
| Scan hints are used to force the planner to do a label scan (followed by a filtering operation) instead of using an index. | |
| Join hints are used to enforce a join operation at specified points. | 
Writing clauses
These comprise clauses that write the data to the database.
| Clause | Description | 
|---|---|
| Create nodes and relationships. | |
| Delete nodes, relationships or paths. Any node to be deleted must also have all associated relationships explicitly deleted. | |
| Delete a node or set of nodes. All associated relationships will automatically be deleted. | |
| Update labels on nodes and properties on nodes and relationships. | |
| Remove properties and labels from nodes and relationships. | |
| Update data within a list, whether components of a path, or the result of aggregation. | 
Reading/Writing clauses
These comprise clauses that both read data from and write data to the database.
| Clause | Description | 
|---|---|
| Ensures that a pattern exists in the graph. Either the pattern already exists, or it needs to be created. | |
| 
 | Used in conjunction with  | 
| 
 | Used in conjunction with  | 
| Invokes a procedure deployed in the database and return any results. | 
Set operations
| Clause | Description | 
|---|---|
| Combines the result of multiple queries into a single result set. Duplicates are removed. | |
| Combines the result of multiple queries into a single result set. Duplicates are retained. | 
Subquery clauses
| Clause | Description | 
|---|---|
| Evaluates a subquery, typically used for post-union processing or aggregations. | 
Multiple graphs
| Clause | Description | 
|---|---|
| Determines which graph a query, or query part, is executed against. | 
Importing data
| Clause | Description | 
|---|---|
| Use when importing data from CSV files. | |
| This query hint may be used to prevent an out-of-memory error from occurring when importing large amounts of data using  | 
Administration clauses
These comprise clauses used to manage databases, schema and security; further details can found in Administration.
| Clause | Description | 
|---|---|
| Create, drop, start or stop a database. | |
| Create or drop an index on all nodes with a particular label and property. | |
| Create or drop a constraint pertaining to either a node label or relationship type, and a property. | |
| Manage users, roles and privileges for database, graph and sub-graph access control. |