What should you do?

You are a database developer. You plan to design a database solution by using SQL Server 2008.
The database will contain a table that has a parent-child relationship to itself. Each child might also be a parent. This might exist up to 10 levels deep.
You need to retrieve all levels by using a single Transact-SQL query.
What should you do?
A. Create a view that returns the first level, and then use the FULL OUTER JOIN operator to join the table back to the view to get the remaining levels.
B. Write a query to return the first level, and then add a correlated subquery to get the remaining levels.
C. Create a common-table expression to return the first level and then union back to itself to get the remaining levels.
D. Write a query to return the first level, and then use the CROSS JOIN operator to join the table back to itself to get the remaining levels.

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.