I tried this and it went ok:
START n = node(*)
      MATCH n-[r]-()
      DELETE n, r
  DELETE n
Its really similar to yours.

On Thursday, May 17, 2012 at 2:58:12 PM UTC-7, Johnny Weng Luu wrote:
>
> First of all, thank you so much for introducing mutative Cypher. It 
> totally rocks!!! :D
>
> I usually delete all nodes and relationships with two queries:
>
> All nodes with relationships:
>
>       START n = node(*)
>       MATCH n-[r]-()
>       DELETE n, r
>
> All nodes without relationships:
>
>       START n = node(*)
>       DELETE n
>
> Is there a way to delete all nodes and relationships with just one query?
>
> I thought this one would do it but it failed:
>
>       START n = node(*)
>       MATCH n-[r?]-()
>       DELETE n, r
>
> Johnny
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to