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
What is a select query statement in ms sql server?
How to perform key word search in tables?
i have made a project i vb.net n created a .exe of it after installing it in to any pc, the database (sql express) is not geting accesed i.e the aplication cuts the link of the database, so plz help in this matter.
sql database suspect We have a sql database that is showing as suspect. How can we recover?
What are logical database components? : SQL Server Architecture
How to create a stored procedure with a statement block in ms sql server?
What does normalization do to data?
What are the source of constraints?
How does recursive cte works in sql server?
Why should we go for stored procedures? Why not direct queries?
How to delete an existing database user?
How to provide column names in insert statements in ms sql server?
explain different types of joins? : Sql server database administration
Recommend an approach to ensuring that all changes in the remote databases synchronize with the SQL Azure database?
Explain the use of containers in ssis?