What are the differences between stored procedure and
functions in SQL Server 2000?
Answer Posted / prashant
1>Procedure can return zero or n values whereas function can
return one value which is mandatory.
2>Procedures can have input,output parameters for it whereas
functions can have only input parameters.
3>Procedure allow select as well as DML statement in it
whereas function allow only select statement in it.
4>Functions can be called from procedure whereas procedures
cannot be called from function.
5>Exception can be handled by try-catch block in a procedure
whereas try-catch block cannot be used in a function.
6>We can go for transaction management in procedure whereas
we can't go in function.
7>Procedures can not be utilized in a select statement
whereas function can be embedded in a select statement.
| Is This Answer Correct ? | 22 Yes | 4 No |
Post New Answer View All Answers
Explain about system stored procedure?
What is the difference between system objects and user objects?
what's the difference between delete table and truncate table commands? : Sql server database administration
How many types of functions are there in sql server?
Is a primary key unique?
What is the maximum rows in sql server table?
What is bit data type?
Why use view instead of a table?
Can you please explain the difference between function and stored procedure?
How to move database physical files in ms sql server?
Explain about nested stored procedure?
What is filtered index?
What is Sqlpaging in SqlServer 2005 ?
how would you improve etl (extract, transform, load) throughput?
how we use window authentication connection with sql server.?