adspace


Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?

Answer Posted / Anand Kumar Tiwari

{"recursion": "A stored procedure can call itself in a process known as recursion. Recursive procedures can be useful for handling tasks that require repeated subtasks, such as calculating factorials or generating tree structures.",n"levels of nesting": "The maximum number of levels of nested stored procedures in SQL Server is 32. However, Microsoft recommends keeping the number of nested stored procedure levels to a minimum to avoid potential performance issues and to maintain manageability".}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different subsets of sql?

1649


List the ways in which dynamic sql can be executed?

1085


List out the different types of locks available in sql server?

1049


How to provide default values to function parameters?

1257


What is a view in sql?

1039


How do I find query history in sql server?

1023


Explain “row_number()” in sql server with an example?

1078


What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?

1196


How do I start sql server 2017?

1015


What is standby servers? Explain types of standby servers.

1078


What are the pros and cons of putting a scalar function in a queries select list or in the where clause?

1298


This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?

2565


do you know how to configure db2 side of the application? : Sql server database administration

1123


What is normalization and what are the advantages of it?

1054


Why use identity in sql server?

1197