Difference between Function and Procedure-in general?
Answer Posted / dharmendra nonia
Function and Stored Procedure both are precompiled objects
in databases but there is some difference between UDFs and
Stored Procedure such as--
1)Function Must be return at least one value but stored
procedure may or may not.
2)We can use Function for only data manipulation but stored
Procedure is used to Manipulation as well as Modification
of Data on tables.
3)We can't use DML statements inside Function but In stored
Procedure, we can use DML statements.
4)In stored Procedure, we can pass INPUT and OUTPUT
parameter but Function accept only input parameter and
return a value.
| Is This Answer Correct ? | 13 Yes | 2 No |
Post New Answer View All Answers
What are partitioned views and distributed partitioned views?
Mention the command used to rename the database.
What is partitioned view?
How to configure and test odbc dsn settings?
Which tools are available to manage SQL Azure databases and servers?
What is pivot and unpivot?
What are the drawbacks of reporting in ssrs?
Does sql server 2016 have ssms?
What are the difference between primary key and unique key? : sql server database administration
How retrieve field names from the table in SQL through JAVA code?
What is partition in sql server?
What are the advantages of passing name-value pairs as parameters?
Can We Use Data-grids For Our Report In Ssrs?
What is Cross Join and in which scenario do we use Cross Join?
What is a mutating table error and how can you get around it?