What are the differences between stored procedure and
functions in SQL Server 2000?
Answer Posted / chauhan rakesh botad
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 ? | 2 Yes | 3 No |
Post New Answer View All Answers
Define normalisation?
How we create SQL Server 2005 Reporting Services ? Give me Sample
What is the maximum size of a dimension? : sql server analysis services, ssas
Why use “pivot” in sql server?
Which sql server is best?
How to disable stored procedure sql server?
What is an inner join?
Explain few of the new features of sql server 2008 management studio
what are the different ways of moving data/databases between servers and databases in sql server? : Sql server database administration
Who is the owner of a schema in ms sql server?
Can group by and orderby be used together?
How to check parameter value in stored procedure sql server?
Can we write a distributed query and get some data which is located on other server and oracle database?
Is foreign key unique?
Do you know the capabilities of cursors?