- 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
-
New Data types in SQL Server 2008 are : DATE - occupies 3 bytes . Has accuracy of 1 day . Data stored in 'YYYY-MM-DD' format TIME...
-
Question : State whether below class relationship is correct or not . If not why ? class A: B {} class B: C {} class C: A {} Answer...
-
How to pass null values to stored procedure from code behind ? Pass the parameter’s value as DBNull.Value from code-behind.
-
Different validation controls in ASP.NET are as follows : RequiredFieldValidator CompareValidator RangeValidator RegularExpressionValida...
-
Different types of primary behaviours are as follows : Service Behaviour Endpoint Behaviour Operation Behaviour Callback Behaviour
-
Cache object belongs to System.Web.Caching namespace.
-
Authentication is process of obtaining credentials such as username and password and validating the credentials. There are 3 types of ASP....
-
Custom HTTPmodule is created for: URL rewriting Compression Specialized authentication and authorization Specialized logging
-
Types of DML statements : Select Insert Update Delete
-
Question : You and a group of programmers have written a new web application using Visual Studio.NET for a new client. The application trac...
No comments:
Post a Comment