Closure Table INSERT statement including the level/distance column
问题 I'm referring Bill Karwin's presentation in order to implement a closure table which will help me manage hierarchies. Unfortunately, the presentation does not show how I could insert/update the Level column mentioned on slide 67; this would have been very useful. I've been giving it a thought but I couldn't come up with something concrete that I could test. Here's what I got so far: create procedure USP_OrganizationUnitHierarchy_AddChild @ParentId UNIQUEIDENTIFIER, @NewChildId