Which SQL commands should be used to write a recursive query if the number of levels is unknown? (Choose two.)
Which SQL commands should be used to write a recursive query if the number of levels is unknown? (Choose two.)
To write a recursive query in SQL when the number of levels is unknown, you should use the commands that support hierarchical or recursive queries. 'CONNECT BY' is used in hierarchical queries to traverse tree-structured data, and 'WITH' is used for Common Table Expressions (CTEs), which can define recursive queries. These two commands are appropriate for handling recursive queries effectively.
CONNECT BY , the recursive CTE portion of the WITH command , Working with CTEs (Common Table Expressions) , Tabular SQL UDFs (UDTFs)
AE is the correct answer. https://docs.snowflake.com/en/user-guide/queries-hierarchical