What are the differences between stored procedure and
functions in SQL Server 2000?
Answer Posted / pavan pareta
1) functions are used for computations where as procedures
can be used for performing business logic
2) functions MUST return a value, procedures need not be.
3) you can have DML(insert, update, delete) statements in a
function. But, you cannot call such a function in a SQL
query..eg: suppose, if u have a function that is updating a
table.. you can't call that function in any sql query.-
select myFunction(field) from sometable; will throw error.
4) function parameters are always IN, no OUT is possible
| Is This Answer Correct ? | 145 Yes | 43 No |
Post New Answer View All Answers
Explain Normalization and DE normalization
What is a group function explain with an example?
What is a livelock?
How can you find out how many rows returned in a cursor?
What is the purpose of a table?
What are the triggers in sql?
What is user-defined multi-statement table-valued function?
How do I edit a stored procedure in sql server?
What is store procedure?
What do you understand by the denormalisation?
How to change the password of a login name in ms sql server?
How do I port a number to sql server?
What is in place upgrade in sql server?
How will you make an attribute not process? : sql server analysis services, ssas
What is the impact on other user sessions when creating indexes?