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 is the difference between Userdefined function and
stored procedure? Explain and give the example also

Answer Posted / ashwini

1. User defined functions can be used in select statements.
Procedures can not be used.

2. Functions must return some value. Procedures do not
always return the value.

3. Functions will take only input parameters. Procedures
can take input as well as output parameters.

4. Not all types of user-defined functions use
INSERT,UPDATE,DELETE statements(Only multi-statement table
valued functions can use). All procedures can use these
statements.

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a rownum?

964


Do you know how to implement service broker?

926


How to recompile stored procedure at run time?

1064


How to sort query output in descending order in ms sql server?

941


Explain what is the difference between union and union all?

1002


Are there any preferred steps that need to be taken care of before starting the installation of sql server 2000?

986


Name the different type of indexes in sql?

952


What is full outer join in sql server joins?

1053


What is difference between rownum and row_number?

959


How do I find the sql server version?

1016


Do you know what are pages and extents? : SQL Server Architecture

988


Can primary key be a foreign key?

1046


New concepts of sql server 2005 use in your project.

2355


What is “begin trans”, “commit tran”, “rollback tran” and “savetran”?

1014


What is the difference between web edition and business edition?

111