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
Can we insert data into a view?
What are the restraints imposed on the table design by a merge replication?
How to get nth highest salary from employee table.
tell me what are the steps you will take to improve performance of a poor performing query? : Sql server database administration
What is read uncmmited?
Tell me what is the significance of null value and why should we avoid permitting null values?
How to create stored procedures with parameters in ms sql server?
What is data modeling and Reterminal integrity?
What is sql server management studio? : sql server management studio
Explain how would you store your query in an SSRS report or a Database server?
How to call a function from a stored procedure in SQL Server ?
How to install sql server 2005 express edition?
What is the cartesian product of the table?
How do I create a trace in sql server?
Where is my database stored on the hard disk in ms sql server?