この例では、再帰的問合わせのWHERE句で、SQL UDFのvalue_expressionを呼び出します。
WITH RECURSIVE temp_table (employee_number) AS ( SELECT root.employee_number FROM employee AS root WHERE root.manager_employee_number = 801 AND test.value_expression(dept_no, 0) = 25; UNION ALL SELECT indirect.employee_number FROM temp_table AS direct, employee AS indirect WHERE direct.employee_number = indirect.manager_employee_number AND test.value_expression(2,3) = 5 ) SELECT * FROM temp_table ORDER BY employee_number;