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 / pavan pareta

1) functions are used for computations where as procedures
can be used for performing business logic
2) functions MUST return a value, procedures need not be.
3) you can have DML(insert, update, delete) statements in a
function. But, you cannot call such a function in a SQL
query..eg: suppose, if u have a function that is updating a
table.. you can't call that function in any sql query.-
select myFunction(field) from sometable; will throw error.
4) function parameters are always IN, no OUT is possible

Is This Answer Correct ?    145 Yes 43 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are defaults? : Sql server database administration

1025


Explain collation?

1015


explain what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration

866


How to insert data with null values?

977


Do you know nested transaction?

912


What is create command?

935


How to execute a sql statement using odbc_exec()?

1072


What you can do to delete a table without the delete trigger firing?

929


What is it’s similarity with sql server?

160


Can group functions be used in the order by clause in ms sql server?

974


What is msdb database? : SQL Server Architecture

1078


How to create new table with "create table" statements?

1017


Define Joins?

982


What is transaction server isolation?

980


What is the full form of ddl?

873