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
Why it is recommended to avoid referencing a floating point column in the where clause?
Why would you use sql agent?
What is temporary stored procedure?
Why truncate is ddl command?
What is 4nf in normalization form?
what is a live lock? : Sql server database administration
How do you trace the traffic hitting a sql server?
What are the authentication modes in sql server? How can it be changed?
How do I find my localdb version?
What are parameterized reports? What are cascading parameters in ssrs reports?
Why union all is faster than union?
What is the difference between Triggers and Stored Procedure?
Does a specific recovery model need to be used for a replicated database? : sql server replication
Why do we use non clustered index?
Do you know the cursor optimization tips?