what is the difference between procedure and function.

Answer Posted / plabana

1.StoreProcedure may return avalue may not return a value
but Function returns the value.
2.SttoreProcedure can be called independently using exec
keyword ,Function are called using select stmt.
3.StoreProcedure can create a table but can't return a table
where as Function can return a value.
4.Transaction related stmt can be handeled by StoreProcedure
Where as it can;t be handeled by Function.

Is This Answer Correct ?    17 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is stretch database in sql server?

761


What is pivot and unpivot?

776


How to find related tables in sql server?

685


How to provide default values to stored procedure parameters?

751


explain how to create a new schema in a database? : Sql server database administration

782






Which is better statement or preparedstatement?

695


What is the current pricing model of SQL Azure?

98


How to get nth highest salary from employee table.

793


What is replication with database mirroring? : sql server database administration

701


What is the use of group by clause?

708


how will add additional conditions in sql?

739


What are the different types of triggers in SQL SERVER?

722


How to insert data with null values?

762


How do you handle datasets larger than 50 gb?

154


Explain cursor as data base object?

769