What is difference between stored procedure & function?
Answer Posted / somu kattikar
Functions
----------
1) can be used with Select statement
2) Not returning output parameter but returns Table
variables
3) You can join UDF
4) Cannot be used to change server configuration
5) Cannot be used with XML FOR clause
6) Cannot have transaction within function
Stored Procedure
-----------------
1) have to use EXEC or EXECUTE
2) return output parameter
3) can create table but won’t return Table Variables
4) you can not join SP
5) can be used to change server configuration
6) can be used with XML FOR Clause
7) can have transaction within SP
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is correlated subquery in sql server?
What are the different types of normalization?
What is for xml in sql server?
What command would you use to add a column to a table in sql server?
Mention the differences between sql server and mysql.
What is model database? : SQL Server Architecture
What is the difference between dataadapter and datareader?
What is the difference between Stored Procedures and triggers?
Tell me what are cursors and when they are useful?
Write a sql query to display the current date?
How many files can a database contain in sql server?how many types of data files exists in sql server? How many of those files can exist for a single database?
What are sql server procedures?
How many categories of data types used by sql server?
What is a natural primary key?
Which table keeps information about stored procedures?