What is difference between stored procedure & function?
Answer Posted / khurram
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 cannot be utilized in a select statement
whereas function can be embedded in a select statement.
| Is This Answer Correct ? | 17 Yes | 3 No |
Post New Answer View All Answers
What is the difference between DataRow.Delete() and DataRow.Remove()?
What is log shipping? Can we do logshipping with SQL Server 7.0 - Logshipping is a new feature of SQL Server 2000. We should have two SQL Server - Enterprise Editions. From Enterprise Manager we can configure the logshipping. In logshipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and we can use this as the DR (disaster recovery) plan.
What are scalar functions in sql?
Mention the 3 ways to get a count of the number of records in a table.
What are the reporting services components?
What are the differences between lost updates and uncommitted dependencies?
How you can get a list of all the table constraints in a database?
Explain acid?
Explain activity monitors
What is temporary stored procedure?
What is the difference between resultset and resultsetmetadata?
What is the contrast between sql and mysql?
How to download and install sql server 2005 books online?
What are SSL and TSL protocols?
What is side by side migration in sql server?