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
How to use the inserted and deleted pseudo tables?
What causes index fragmentation?
How do users use Report Builder with SQL Server data sources?
How to connect to SQL Azure Database by using sqlcmd?
What is a trace frag? Where do we use it?
What are the fixed server level roles? : sql server security
What is cube dimension? : sql server analysis services, ssas
In what three ways is the return statement used in a stored procedure?
What is sql server programming?
What are the types of normalization?
How you can move data or databases between servers and databases in sql server?
What stored by the msdb? : sql server database administration
How will you go about resolving deadlocks?
what is an index? : Sql server database administration
The external application that is executed in one of the tasks does not have a log file, but only a screen log. How can I save the data from the screen? : sql server management studio