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

Explain the various types of concurrency problem?

0 Answers  


What are the types of stored procedures in an sql server?

0 Answers  


What is the main purpose of having conversation group?

0 Answers  


What is the cartesian product of the table?

0 Answers  


What is normalization 1nf 2nf 3nf?

0 Answers  






how to select 5 to 7 rows from a table, which contains 10 rows?

21 Answers   IBM,


What is the full meaning of dml?

0 Answers  


Can we rewrite subqueries into simple select statements or with joins? Example?

2 Answers   ASD Lab,


How to Get the last identity value used

4 Answers  


How does index makes search faster?

0 Answers   QuestPond,


Can we call a function that has out parameter in select statement

0 Answers   Nagarro,


What is star, snowflake and star flake schema? : sql server analysis services, ssas

0 Answers  


Categories