What is difference between stored procedure & function?
Answer Posted / khurram
1>Procedure can return zero or n values whereas function can
return one value which is mandatory.
2>Procedures can have input,output parameters for it whereas
functions can have only input parameters.
3>Procedure allow select as well as DML statement in it
whereas function allow only select statement in it.
4>Functions can be called from procedure whereas procedures
cannot be called from function.
5>Exception can be handled by try-catch block in a procedure
whereas try-catch block cannot be used in a function.
6>We can go for transaction management in procedure whereas
we can't go in function.
7>Procedures cannot be utilized in a select statement
whereas function can be embedded in a select statement.
| Is This Answer Correct ? | 17 Yes | 3 No |
Post New Answer View All Answers
How to define and use table alias names in ms sql server?
What are relationships and mention different types of relationships in the dbms
Explain about Joins?
What is 2nf in normalization?
Types of Authentications in Sql Server? How user gets authenticated through windows authentication?
Is the primary key column of a table an index in ms sql server?
How to copy data from one table to another table?
What is meant by indexing?
What are parameterized reports?
Differentiate sql server reporting services vs. Crystal reports?
Explain how to send email from sql database?
Can We Use Data-grids For Our Report In Ssrs?
What is relationship? What number of sorts of relationship are there?
If a table does not have a unique index, can a cursor be opened on it?
What is a trace frag?