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
How much space does sql server 2016 take?
What is a view in sql?
How to find which stored procedure is currently running in sql server?
What is set nocount on and what is set nocount off?
What happens to a statement batch if there is a compilation error?
What is constraints and its types?
Do you know concepts and capabilities of sql server?
Can anyone tell that the extra features are there in SQL SERVER 2008 that are not available in previous versions .
How to execute multiple stored procedures at one time in sql server?
What are commonly used mssql functions in php?
A user is a member of the public role and the sales role. The public role has select permission on all the tables. The sales role does not have select permission on some of the tables will the user be able to select from all tables?
What are security principals used in sql server 2005?
Explain what are the restrictions while creating batches in sql server?
What authentication modes does sql server support?
What is subquery in sql?