What is the difference between Userdefined function and
stored procedure? Explain and give the example also
Answer Posted / ashwini
1. User defined functions can be used in select statements.
Procedures can not be used.
2. Functions must return some value. Procedures do not
always return the value.
3. Functions will take only input parameters. Procedures
can take input as well as output parameters.
4. Not all types of user-defined functions use
INSERT,UPDATE,DELETE statements(Only multi-statement table
valued functions can use). All procedures can use these
statements.
Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
What are pessimistic lock and optimistic lock?
Why does sql studio use a single registered database repository? : sql server management studio
What are date and time data types in ms sql server?
Do you know what are the restrictions applicable while creating views? : SQL Server Architecture
What is collation?
If a table does not have a unique index, can a cursor be opened on it?
How to set database to be read_only in ms sql server?
what is blocking? : Sql server database administration
What is trigger and different types of Triggers?
what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration
Which joins are sql server default?
which backup strategy you are following at ur company
You want to generate a report that is formatted as a chart. Can you use the report wizard to create such a report?
What is best institute to Learn DotNET And SQL in chennai?
How to use subqueries with the exists operators in ms sql server?