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 a database in ms sql server?

1047


What is service broker? : sql server database administration

982


Is it possible to have clustered index on separate drive from original table location?

952


Mention a few common trace flags used with sql server?

923


Do you know what are acid properties of transaction?

948


What is mscorsvw.exe - process - microsoft .net framework ngen?

941


Explain how you can deploy an SSRS report?

146


How do I create a partition table in sql server?

1094


What is truncate table?

930


Can truncate be rolled back?

925


Why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it?

875


Can you explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?

971


What are the underflow and overflow behaviors on float literals?

1106


What is data source object?

988


What is sql server programming?

1029