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 to modify existing triggers using "alter trigger"?
What type of Index will get created after executing the above statement?
What is difference between view and materialized view?
you notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it? : Sql server administration
What is an indexing strategy?
What is model database in sql server?
Explain temporary table vs table variable by using cursor alternative?
Benefits of Stored Procedures?
What are the dmvs?
How do I view a stored procedure in sql server?
When does a workload on SQL Azure get throttled?
What is 3nf normalization?
Is truncate autocommit?
Define model database?
What is side by side migration in sql server?