Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are the differences between stored procedure and
functions in SQL Server 2000?

Answer Posted / bed singh

a. A FUNCTION is always returns a value using the return
statement. A PROCEDURE may return one or more values
through parameters or may not return at all.
b. Functions are normally used for computations where as
procedures are normally used for executing business logic.
c. A Function returns 1 value only. Procedure can return
multiple values (max 1024).
d. Stored procedure returns always integer value by default
zero. Whereas function returns type could be scalar or
table or table values
e. Stored procedure is precompiled execution plan where as
functions are not.
f. A function can call directly by SQL statement like
select func_name from dual while procedure cannot.
g.Stored procedure has the security and reduces the network
traffic and also we can call stored procedure in any no. of
applications at a time.
h. A Function can be used in the SQL Queries while a
procedure cannot be used in SQL queries .that cause a major
difference b/w function and procedures.

Is This Answer Correct ?    165 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is normalization 1nf 2nf 3nf?

1060


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

1076


is it important for a database administrator to understand the operating system and file access? : Sql server administration

1029


What does it mean to normalize a database and why would you do it?

979


What is bit data type? What's the information that can be stored inside a bit column?

921


What will be the value of @@fetch_status if a row that was a part of the cursor resultset has been deleted from the database after the time the stored procedure that opened the cursor was executed?

1141


How do I view a procedure in sql server?

991


Is sql server a database?

998


What are the tools available in market as an alternative to sql server reporting services?

131


What is the difference between an index and a unique index?

1001


What is it unwise to create wide clustered index keys?

1007


Can you please explain the difference between function and stored procedure?

1007


Is profiler the only tool that has the ability to audit and identify ddl events? : sql server security

1049


What are the differences between DDL, DML and DCL in SQL?

1229


Mention the differences between local and global temporary tables.

1043