can i write function in stored procedure and stored
procedure in function and nested procedure.Give one example
for each question?



can i write function in stored procedure and stored procedure in function and nested procedure.Give..

Answer / dba

You cannot define stored procedures (SP) or user-define
functions (UDF) in a nested fashion. However, you can
execute SPs and UDFs inside of stored procedures. The
nesting is limited to 32 levels deep (A calls B, which calls
C, etc). So if a recursive call is used (A calls A), you
must have some method of stopping before 32 levels is exceeded.

You can call SPs and UDFs from inside of a UDF, but this
ability is quite limited. If a SP has any side effect, it
cannot be called. So, the SP cannot be used to return any
values to the function.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More SQL Server Interview Questions

what are constraints? : Sql server database administration

0 Answers  


Explain about extended stored procedure?

0 Answers  


Tell me about Triggers?

3 Answers   Cap Gemini,


Define outer join in sql server joins?

0 Answers  


how can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role? : Sql server administration

0 Answers  






What do you understand by coalesce in sql server?

0 Answers  


How fixed length strings are truncated and padded?

0 Answers  


What is the difference between locking and multi-versioning?

0 Answers  


Are connections to sql server encrypted?

0 Answers  


How do I find the port number for sql server?

0 Answers  


What is the difference between createstatement and preparedstatement?

0 Answers  


How to compare the top two records using sql?

0 Answers  


Categories