Suppose we have two tables: Parent (id uniqueidentifier, cola varchar(100), colb int, colc bit) Child (id uniqueidentifier, Parent_id uniqueidentifier, cola varchar(100)) I've seen a lot of procedures along these lines: CREATE PROCEDURE ps_Parent(@get_children bit = 0) AS IF @get_children = 0 BEGIN...