Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-01-2021 11:40 PM
what is difference between is not null and exists constraint in neo4j are they same also was trying to create below but getting error :
Invalid input 'n': expected whitespace, comment or UNIQUE (line 1, column 70 (offset: 69))
"CREATE CONSTRAINT constraint_name ON (book:Book) ASSERT book.isbn is not null"
Any guess why its giving error
Solved! Go to Solution.
07-02-2021 02:03 AM
Yes, you're right. they are equivalent.
It's just a matter of syntax. that is, up to neo4j 4.2, the syntax with "IS NOT NULL" was not interpreted by cypher.
Since version 4.3 this syntax has been added, as you can see here:
Obviously "IS NOT NULL" and "exists" coincide.
07-02-2021 02:03 AM
Yes, you're right. they are equivalent.
It's just a matter of syntax. that is, up to neo4j 4.2, the syntax with "IS NOT NULL" was not interpreted by cypher.
Since version 4.3 this syntax has been added, as you can see here:
Obviously "IS NOT NULL" and "exists" coincide.
All the sessions of the conference are now available online