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 collation sensitivity?

545


what is the maximum size of a row? : Sql server database administration

528


How can we improve performance by using SQL Server profiler?

569


How can you insert values in multiple rows using one Insert statement?

609


Define magic tables in sql server?

562






What is a trigger what are the advantages of trigger?

521


Define tempdb database?

587


Explain in brief how sql server enhances scalability of the database system?

474


What are the different types of collation sensitivity?

543


What is spid in sql server profiler?

525


Can binary strings be converted into numeric or float data types?

543


What command would you use to add a column to a table in sql server?

740


Explain how would you store your query in an SSRS report or a Database server?

88


What is an execution plan?

561


Is mysql better than sql server?

532