下一步SQL正在运行:
SELECT T2.id, T2.name
FROM (
SELECT
@r AS _id,
(SELECT @r := IDParent FROM objects WHERE id = _id) AS parent_id
FROM
(SELECT @r := 10) vars,
objects m
WHERE @r <> 0) T1
JOIN objects T2
ON T1._id = T2.ID
但我只能通过查询找到ID:
SELECT ID FROM objects WHERE LOWER(name) LIKE LOWER('%prod%')
告诉我如何组合这些查询