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
Tell me extended events in sql server 2008?
What functions can a view be used to performed?
Name three of the features managed by the surface area configuration tool? : sql server security
What are different type of Collation Sensitivity?
How do I partition a table in sql server?
What do you understand by a view?
1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?
Tell me what is the stuff and how does it differ from the replace function?
What is an indexed view?
What are the advantages of having an index on the sql server?
How to use group functions in the select clause in ms sql server?
What is 3nf normalization?
Is sql server a database?
What is difference between inner join and join?
How to rebuild all indexes on a single table?