infogulch

Untitled

Jun 1st, 2012
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.17 KB | None | 0 0
  1. INSERT INTO closures (ancestor, descendant, pathlength)
  2. SELECT ancestor, id, pathlength+1
  3. FROM closures
  4. JOIN nodes ON parent_id = descendant
  5.  
  6. -- what about (id, id, 0) ?
Advertisement
Add Comment
Please, Sign In to add comment