can i write function in stored procedure and stored
procedure in function and nested procedure.Give one example
for each question?
Answer Posted / 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 View All Answers
What are page splits? : SQL Server Architecture
How adventureworkslt tables are related?
What is the purpose of the master database?
What are a scheduled jobs?
What is the difference between SQL notification and SQL invalidation?
System variable and temporary variables
what is the information that can be stored inside a bit column? : Sql server database administration
Does partitioning help performance?
how to invoke a trigger on demand? : Sql server database administration
What is serializable?
What is the use of custom fields in report?
How to edit table in sql server 2017?
What is wide table?
Does sql server 2000 clustering support load balancing?
What are different types of raid levels?