Difference between Function and Stored Procedure?

Answer Posted / deepak

1)Functions cannot affect the state of the database which
means we cannot perform insert,delete,update and create
operations on the database.
Stored Procedures can affect the state of the database by
using insert,delete,update and create operations.

2)Functions are basically used to compute values
stored procedures are basically used to process the task.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is optimization and its types?

534


How many levels of sp nesting is possible?

582


What is the difference function and stored procedure?

562


How to get the definition of a user defined function back?

565


You are designing a database for your human resources department in the employee table, there is a field for social security number, which cannot contain null values if no value is given, you want a value of unknown to be inserted in this field what is the best approach?

617






how many clustered indexes can be created on a table? : Sql server database administration

561


How to assign new column names in a view?

507


How to enforce security in sql server? : sql server security

619


How to list all triggers in the database with sys.triggers in ms sql server?

536


Explain some stored procedure creating best practices or guidelines?

518


Can sub report data source be different from that of the parent report?

105


What are the restrictions applicable while creating views? : SQL Server Architecture

584


How to define and use table alias names in ms sql server?

557


What do you mean by the term 'normalization'?

666


How does using a separate hard drive for several database objects improves performance right away?

528