SQL Parent/Child recursive call or union?

后端 未结 5 978
有刺的猬
有刺的猬 2021-02-10 11:04

I can\'t seem to find a relevant example out there.

I\'m trying to return a sub-set of a table, and for each row in that table, I want to check how many children it has,

5条回答
  •  情深已故
    2021-02-10 11:24

    Your queries all assume that the order that the parent child nodes are entered is sequential. If a child from one of the first nodes is entered at the end and its ID or PK is higher, then the query doesn't work.

提交回复
热议问题