Explanation:In the above query,immediate children is returned using the NodeLevel column (@parentNodeLevel + 1). And also notice that I have opted out the parent node because IsDescendantOf function includes the parent node as well in the result. 8. Which of the code deletes node H using hierarchial data type ?
A. DELETE FROM H WHERE Name = ‘Steve’
B. DROP FROM H WHERE Name = ‘Steve’
C. DELETE H WHERE Name = ‘Steve’
D. All of the mentioned
Answer:A
Explanation:In the above query,immediate children is returned using the NodeLevel column (@parentNodeLevel + 1). And also notice that I have opted out the parent node because IsDescendantOf function includes the parent node as well in the result. 8. Which of the code deletes node H using hierarchial data type ?
A. DELETE FROM H WHERE Name = ‘Steve’ B. DROP FROM H WHERE Name = ‘Steve’ C. DELETE H WHERE Name = ‘Steve’ D. All of the mentioned
Explanation: Deleting a node does not automatically delete the child nodes, this would result in orphaned children.