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

Determine how to use the inserted and deleted pseudo tables?

525


Please differentiate between a local and a global temporary table?

557


What is the difference between DATETIME2 and DATETIME?

618


How to view the error log for any specific instance? : sql server database administration

577


What is wide table?

526






What is the difference between Triggers and Stored Procedure?

562


How to stop log file growing too big?

570


What do you understand by the denormalisation?

545


Suppose you want to implement the many-to-many relationships while designing tables. How would you do it?

535


What are the three different part of rdl file explain them?

168


How to check if stored procedure is running in sql server?

475


What is the purpose of grouping data in a report?

533


Can the query output be sorted by multiple columns in ms sql server?

549


What is b tree index?

506


You have a table ‘test’ which is a copy of northwind employee table you have written a trigger to update the field ‘hiredate’ with the current date

592