infogulch

Untitled

Jun 7th, 2012
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.13 KB | None | 0 0
  1. CREATE VIEW parent_of
  2. AS
  3. SELECT id, ancestor AS parent_id, isdir, name
  4. FROM nodes
  5. JOIN closures ON descendant = id AND pathlength = 1;
Advertisement
Add Comment
Please, Sign In to add comment