简体   繁体   English

如何在具有父子关系的表中获取父子然后父子的查询结果?

[英]How can get the query result of order parent-child then paren-child in the table with parent-child relationship?

How can I get the query result as the picute below? 如何获取查询结果,如下图所示?

Text field is random text (not by alphabet order as the picture). 文本字段是随机文本(不是按字母顺序排列的图片)。 在此处输入图片说明

For the data you have presented, order by text works. 对于您提供的数据, order by text However, that is probably not a general solution for what you want to do, unless the names of the nodes (as in your example) follow a very set pattern. 但是,这可能不是您要执行的操作的通用解决方案,除非节点名称(如您的示例中)遵循非常固定的模式。

Order it in ascending order 升序订购

SELECT *
FROM table_name
ORDER BY Text ASC 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM