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 indexes in sql?
What is row_number()?
List out what other servers you can use with ssrs?
How many levels of sp nesting is possible?
How many servers can we create in a single subscription?
How do I completely remove sql server instance?
What is transaction server isolation?
Explain mixed authentication mode of sql server?
Find nth lowest salary or get nth lowest salary?
Tell me the difference between clustered and non-clustered index?
What is the Difference Between Primary and Foreign Key?
What is the difference between row_number and dense_rank?
How many types of local tables are there in sql server?
List the different index configurations possible for a table?
What will be the value of @@fetch_status if a row that was a part of the cursor resultset has been deleted from the database after the time the stored procedure that opened the cursor was executed?