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
Is it possible to update the views? If yes, how, if not, why?
What is the difference between a unique key and primary key?
Explain microsoft sql server functions?
Difference between Sql server reporting services and Crystal reports?
please differentiate between delete and truncate?
Describe different Processing Modes offered by SSRS?
How to test values returned by a subquery with the in operator?
How to find index size for each index on table?
Can you explain important index characteristics?
What is normalization according to you and explain its different levels?
Explain Capacity planning to create a database? and how to monitor it?
What are ddl triggers and types of ddl trigger?
Define the one-to-one relationship while designing tables.
Define Business Edition in SQL Azure?
Give me any three differences between Truncate and Delete.