[MySQL] 순서 매기기

순서 매기기

SELECT @rownum:=@rownum+1 AS no, t.id, t.name
FROM tree t 
WHERE (@rownum:=0)=0
AND t.`type` = 10
AND t.depth = 2
AND t.parent = 76
ORDER BY t.id
;

links

social