Can store procedure call by user define function in SQL
server?

Answer Posted / samba shiva reddy . m

sorry the last post was not correct.

yes we can call stored procedure in User defined function.
1.Stored procedures are pree compiled and functions are not pree compiled it will execute at run time.
2.Functions cannot affect the state of the database which means we cannot perform insert,delete,update and create operations on the database.
Stored Procedures can affect the state of the database by using insert,delete,update and create operations.
3.Procedure can return zero or n values whereas function can return one value which is mandatory.
4.Procedures can have input,output parameters for it whereas functions can have only input parameters.
5.Functions can be called from procedures and in select statement and whereas procedures cannot be called from function or select statement.
6.A Function returns 1 value only. Procedure can return
multiple values (max 1024).
7. Stored procedure returns always integer value by default
zero. Whereas function returns type could be scalar or
table or table values.

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is transaction server explicit transaction?

548


What is an execution plan? When would you use it?

587


Explain how you can configure a running aggregate in SSRS?

111


What do you mean by normalisation?

513


What is the primary use of the model database?

636






How do I trace a query in sql server?

550


Explain what you mean by 3 tier architecture.

633


What is forward - only cursors / read only cursor?

525


Is sql server is free?

558


How you can move data or databases between servers and databases in sql server?

574


What type of Index will get created after executing the above statement?

649


Mention the uses of stored procedures.

581


What is the difference between a clustered index and a non-clustered index?

538


What to check if a User database is locked?

596


Do you know what are acid properties?

580