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
Some queries related to SQL
Every night you run a full backup after every 3 three hours you make a differential backup every hour you make an incremental backup in a worst-case scenario, how much work you can lose?
What do you mean by stored techniques? How would we use it?
If you want to send some data from access database to sql server database. What are different component of ssis will you use?
What is row_number()?
do you know how to configure db2 side of the application? : Sql server database administration
What do we have to check in database testing?
Why can there be only one clustered index and not more than one?
What do you understand by a view? What does the with check option clause for a view do?
How to use subqueries in the from clause in ms sql server?
What is difference between group by and having?
What is the standby server?
Where is my database stored on the hard disk in ms sql server?
How to bind a view to the schema of the underlying tables?
what type of index will get created after executing the above statement? : Sql server database administration