- Stored procedure cannot be executed using SQL Select command whereas Function (UDF) can be executed using SQL Select command. Stored Procedure can be executed using execute command i.e EXEC or EXECUTE
- Stored Procedure can return zero to n values whereas Function can return one value that is mandatory
- Stored Procedure can have input and output parameters whereas Function can have only input parameters.
- Stored Procedure can call functions whereas Function cannot call stored procedures.
- Stored Procedure exception handling can be done by try-catch block whereas Function exception handling cannot be done by try-catch block.
- Stored Procedure can't return a table variable although it can create a table while Function returns table variables.
- Stored Procedure can change the server environment or your operating system environment, while Function can change the server environment or your operating system environment
Difference between stored procedure and function
Stored Procedure vs Function
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Cache Callback provides an ability where by some actions can be performed when that item is removed from cache CacheItemRemovedCallback ex...
-
XML DOM loads the entire xml document into memory whereas Simple API for XML ( SAX ) does not load entire xml document into memory XML DOM ...
-
Different types of diagrams in UML : UseCase diagram Class diagram Object diagram State diagram Sequence diagram Collaboration diagram...
-
Virtual-Override and New Class Child inherits from Class Parent and has mehtod ShowVirtualOverride() and ShowNew() methods. Please see th...
-
Question : Name few C# 3.0 enhancements ? Answer : The C# 3.0 language enhancements are as follows: Implicitly typed local variables I...
-
If locaction attribute is specified, must be one of: Any, Client, Downstream, None, Server or ServerAndClient.
No comments:
Post a Comment