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 lock escalation? : sql server database administration
What are the aggregate and scalar functions?
How to return the date part only from a sql server datetime datatype?
How will you find out if there are expensive SQL statements running or not?
What are the joins in sql server? : sql server database administration
What are different types of statements that are supported by sql?
Explain the relational database management system (rdbms)?
Can primary key be a foreign key?
What are “phantom rows”?
Explain microsoft sql server functions?
What new changes are being made in SQL Server?
How to update multiple rows with one update statement in ms sql server?
Can a rule be bound to any column of any data type?
What is the sql server 2000 version number?
How many replicas are maintained for each sql azure db?