What is the difference between Userdefined function and
stored procedure? Explain and give the example also
Answer Posted / selvaraj.v
1.A stored procedure is a precompiled collection of
Transact-SQL statements stored under a name and processed
as a unit that you can call from within another Transact-
SQL statement or from the client applications.
2.Stored procedure performs an action.
3.A collection of SQL statements often combined with
Control-of-flow statements.
1.User Defined Functions are compact pieces of Transact SQL
code, which can accept parameters, and return either a
value, or a table. They are saved as individual work units,
and are created using standard SQL commands. Data
transformation and reference value retrieval are common
uses for functions.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What are the steps to insert a table?
Do you think BCNF is better than 2NF & 3NF? Why?
Do you know what is xpath?
How to fetch the next row from a cursor with a "fetch" statement?
Explain what are partitioned views and distributed partitioned views?
Explain what is the main purpose of having conversation group?
What is the default order of an order by clause?
Describe in brief system database.
How to specify the collation for a character data type in ms sql server?
What is a filestream?
After creating the cube, if we added a new column to the oltp table then how you add this new attribute to the cube? : sql server analysis services, ssas
If a table does not have a unique index, can a cursor be opened on it?
what is a schema in sql server 2005? : Sql server database administration
What is the difference between rank and dense_rank?
How raid can influence database performance?