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
What are different types of replication in sql server?
what is difference between view and Dip.
What are the different authentication modes in sql server?
What is data mart? : sql server analysis services, ssas
What is the importance of three tier architecture?
How to Check if table exists in sql server?
Explain sql server authentication modes?
What are the advantages of using stored procedures?
you have a table with close to 100 million records recently, a huge amount of this data was updated now, various queries against this table have slowed down considerably what is the quickest option to remedy the situation? : Sql server administration
What is resultset concur_updatable?
What is role playing dimension with two examples? : sql server analysis services, ssas
When to use Inner join & when to use subquery?
create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration
What are the differences between DDL, DML and DCL in SQL?
Can a cursor be updated? If yes, how you can protect which columns are updated?