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
Explain the properties of sub-query in sql server?
What are system databases into sql server (2005/2008)?
What is nested transaction?
Can a trigger be created on a view?
Explain trigger and its types?
Why truncate is ddl?
How check triggers in sql server?
How to connect of datebase with sql express.?
How to read data in a table with "select" statements?
What are horizontal and vertical scaling?
on line cluster can we make if yes tell me the procedure
What is sql server profiler trace data file?
what are different types of raid configurations? : Sql server database administration
What are types of scd? : sql server analysis services, ssas
How to create view in stored procedure sql server?