我相信HANA DB中不支持递归函数,因此,建议使用HANA查询来解决以下问题。
问题陈述:
考虑下表,作为“ orange”可用的一个输入,用于查询下表以获取“ orange”的“ child”值,同时,获得的“ child”值应视为“ parent”来获取所有相关的子值。
表格:(假设表格名称为'水果')
child parent
apple orange
grapes apple
pomo grapes
pears orange
plums pears
jack cashew
输入:
column name-parent, value-orange
预期输出:
apple, grapes, pomo, pears, plums