Home > database >  Consult the tree menu data table lookup method of leaf node
Consult the tree menu data table lookup method of leaf node

Time:04-14

Table structure as
Nodeid parentid name
1001 100 aa
100101 1001 bb
.


Find all the bottom level node, should be how to write SQL statements

CodePudding user response:

SELECT * FROM table name A WHERE NOT the EXISTS (SELECT * FROM table B WHERE ID=p. a. ID)

Feel like you can

CodePudding user response:

1/f, positive solutions, not to their own node to the parent node, is the level at the nodes
  • Related