Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set null value with Cypher in Neo4j

Tags:

neo4j

cypher

I am trying to set a null value for a property when I create a node.

I tried something like this:

CREATE(p:Person {p_id: TOINT(line.`id`) })
SET p.initials = null

But that gives me Neo.ClientError.Statement.SyntaxError.

How can I set a null value with CQL in Neo4j?

like image 671
Jeroen Steen Avatar asked Dec 03 '25 10:12

Jeroen Steen


1 Answers

In Neo4j you can't set null to property that way. But to get the same result you can remove the property for the given node. You can learn more about removing properties in neo4j docs

like image 73
Armen Sanoyan Avatar answered Dec 05 '25 12:12

Armen Sanoyan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!