我正在尝试记录一些SQL,并希望得到正确的术语.如果你这样写SQL;
select child.ID, parent.ID
from hierarchy child
inner join hierarchy parent
on child.parentId = parent.ID
Run Code Online (Sandbox Code Playgroud)
然后你有一个实际的表('hierarchy')你给了两个名字('parent'和'child')我的问题是关于你如何引用一个带有名字的表的逻辑实体.
你会在这里写下这个名字的空白吗?
"此查询使用一个表(层次结构),但两个_(子和父)"
[编辑]在问题中留下了先前的草稿.现在纠正了.