SQL Database Concepts Question:
Download Questions PDF

Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of SP nesting is possible?

Answer:

Recursion is method of problem solving where the solution is arrived at by repetitively applying the logic and solution to the subsets of the problem.

Transact-SQL supports recursion. So, yes it is possible for a stored procedure to call itself.

Stored procedures and managed code references can be nested up to 32 levels.

Download Basic SQL Server Interview Questions And Answers PDF

Previous QuestionNext Question
Explain Comment on Transactions?Tell me what do you mean by an execution plan? Why is it used? How would you view it?