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 you can take to avoid “deadlocks”?
What is SQL Azure Data sync?
Write the syntax for stuff function in an sql server?
Difference between group by clause and having clause in SQL?
What is store procedure? How do they work? When do you use?
What is a rollup clause?
What is dbcc? Give few examples.
what is the system function to get current user's user id? : Sql server database administration
How to loop through result set objects using mssql_fetch_array()?
Explain forward - only cursors?
Which is faster statement or preparedstatement?
What is sql server used for?
What is normalization and denormalization in sql server?
What is attribute relationships, why we need it? : sql server analysis services, ssas
How to disable triggers using "disable trigger"?