Difference in stored procedure and user defined function, DOT NET Programming

What is the difference between Stored Procedure (SP) and User Defined Function (UDF)?

Some of major differences between a stored procedure and user defined are as follows:-

1.      The UDF can be executed by using the "SELECT" clause while SP's can not be.

2.      The UDF cannot be used in the XML FOR clause while the SP's can be used.

3.      The UDF does not return any output parameters while the SP's return output parameters.

4.      If there is an error in the UDF its stops executing. But in SP's it just ignores the error and moves to the next statement.

5.      The UDF cannot make permanent changes to the server environments while SP's can

6.      Change some of the server environment.

Posted Date: 9/24/2012 3:20:35 AM | Location : United States







Related Discussions:- Difference in stored procedure and user defined function, Assignment Help, Ask Question on Difference in stored procedure and user defined function, Get Answer, Expert's Help, Difference in stored procedure and user defined function Discussions

Write discussion on Difference in stored procedure and user defined function
Your posts are moderated
Related Questions
What is Post Cache substitution? The Post cache substitution is used when we want to cache the complete page but also require some of the dynamic region inside that cached page

Design an interface and add code to command buttons using case statement, to find coursework to be calculated using formula 0.6*1/6*total Mark

Briefly explain what user controls are and what server controls are and the differences among the two.   An ASP.NET control (sometimes known as a server control) is a server-si


Describe the various components in sequence diagrams. Object lifeline: - It shows the lifetime of an object creation and its destruction. If the object is created or des

The Events are always public as they are meant to serve each one registering to it. But you can access modifiers in the events.You may have events with protected keyword which will

What is an identifier? Identifiers are northing but names given to various entities uniquely identified in a program. The name of identifiers must vary in spelling or casing. F

What are the different accessibility levels in .NET? The five levels of access modifiers are as follows:- Private: The members of the class only have the access.

How can you implement a condition in a workflow? You can implement a condition by using either of the following ways: By creating a rule condition - Specifies that you can e

Describe the disconnected architecture of ADO.NET's data access model. ADO.NET maintains a disconnected database access model, which means, the application never remains linked