使用遍历的匹配语句是否有一种好方法可以删除?
我正在尝试这样的删除声明,它会抓住属于999教室的学生。无论如何它似乎无法正常工作。
delete vertex from (select
from
(match
{class: student, as: student}
.in(){class: classroom, as: classroom, while:(true), where: (id = 999)}
return student))
这不作为子查询工作。
答案 0 :(得分:0)
我最初使用遍历进行操作。然后我注意到它没有作为“节点”返回。请注意,我必须“扩大”退回的学生!
delete vertex from (select expand(student)
from
(match
{class: student, as: student}
.in(){class: classroom, as: classroom, while:(true), where: (id = 999)}
return student))