我有一个类别表,其中包含(id,name,parent_categ) 我想选择具有子类别的类别(父类的根类别为空)
这是我的疑问:
SELECT M.`id`, M.`name`,(select S.`name` from `categories` AS S where M.`id` = S.`parent_categ` ) AS sub
FROM `categories` AS M
Group by M.`id`,M.`name`
为什么要给我这个错误?!!
答案 0 :(得分:0)
试试这个:
triple is (1,2,3)
triple is (2,3,4)
triple is (3,4,5)
tripleVariable is (1,"two","three")