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 do you understand by a stored procedure?
What does the not null constraint do?
What is the difference between cube operator and rollup operator? : SQL Server Architecture
Write query to return all rows sql?
What will be query used to get the list of triggers in a database?
what changed between the previous version of sql server and the current version? : Sql server database administration
Do you know what is lock escalation?
What is the difference between char, varchar and nvarchar?
Can we linked SharePoint to a SQL database?
What is a trace frag?
How many types of objects are there?
What are “phantom rows”?
Can you explain various data region available in ssrs with their use?
What is use of except clause?
Do you know what are pages and extents? : SQL Server Architecture