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


Please Help Members By Posting Answers For Below Questions

Give some Scenario for Non Clusterd index? Can we write system defined functions in side The Function? Wat is the Unique Datatype?

2087


How to achieve Paging of records in SQL SERVER?

594


What is model database in sql server?

576


How to stop log file growing too big?

580


How do you run a trace?

522






How to defragment table indexes?

556


What is SQL Azure Fabric?

92


What is the need for indexing?

502


List down some advantages of sql stored procedure?

566


How much is a sql server license?

510


1.what is the diff between nolock optimizer and read uncommitted isolation? 2.what is the diff between revoke and deny? 3.what is percieved down time? 4.whether password protection are required for backups?if yes why?if no why? 5.what is fill factor? 6.what is cost analysis? 7.what is mean by piece meal restore? 8.what is 'rowguidcol'? 9.impersonate permission? 10.what is selectivity?

1633


Explain about the command-line tool SQLCMD?

557


What are the types of dml?

558


How do you open a cluster administrator?

630


Why I am getting "the microsoft .net framework 2.0 in not installed" message?

516