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

Answer Posted / samba shiva reddy . m

no we can not call as 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 ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to write the storeprocedure with in the store procedure? and how can we write the store procedure with in a trigger vice versa? plz post me the exact answer?

2108


How to create a user name in a database?

580


What is the maximum rows in sql server table?

506


How do you migrate data from mssql server to azure?

151


Difference between uniqe index and uniqe constraint?

536






Explain left outer join and right outer join?

551


Explain various data region available in ssrs with their use?

488


What is blocking and how would you troubleshoot it? : sql server database administration

580


What is the full form of ddl?

501


what protocol both networks use? : Sql server database administration

534


What is an etl file?

522


How many joins in sql server?

512


What information is maintained within the msdb database?

536


You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?

541


Do you know concepts and capabilities of sql server?

575