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 are relationships and mention different types of relationships in the dbms

565


What is the difference between SQL notification and SQL invalidation?

593


what is package and it uses and how can u call a package

1564


Explain magic tables in sql server?

556


What are the extra roles available in msdb? : sql server security

644






What is @@error in sql?

625


How to start and end transact-sql statements?

586


Explain what are various ways to enhance the ssrs report?

575


What are the new features introduced in SQL Server 2000 (or the latest release of SQL Server at the time of your interview)? What changed between the previous version of SQL Server and the current version?

592


What is merge replication?

714


What are the character string functions supported by sql server 2005?

525


What is the ‘fillfactor’?

568


What are group functions in query statements in ms sql server?

557


Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?

875


What are the pre-defined functions in the sql server?

525