copy a tree structure (with identity PK ) in sql

Posted by Omu on Stack Overflow See other posts from Stack Overflow or by Omu
Published on 2010-05-19T12:14:27Z Indexed on 2010/05/19 12:30 UTC
Read the original article Hit count: 219

Filed under:
|

I have a table like this

Foo(id, parentId)

and need to create a copy of a sub-tree (e.g. exec copyTree 35)

anybody knows how to do it ?

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server