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

Answers were Sorted based on User's Feedback



What is the difference between Userdefined function and stored procedure? Explain and give the exa..

Answer / selvaraj.v

1.A stored procedure is a precompiled collection of
Transact-SQL statements stored under a name and processed
as a unit that you can call from within another Transact-
SQL statement or from the client applications.
2.Stored procedure performs an action.
3.A collection of SQL statements often combined with
Control-of-flow statements.

1.User Defined Functions are compact pieces of Transact SQL
code, which can accept parameters, and return either a
value, or a table. They are saved as individual work units,
and are created using standard SQL commands. Data
transformation and reference value retrieval are common
uses for functions.

Is This Answer Correct ?    8 Yes 0 No

What is the difference between Userdefined function and stored procedure? Explain and give the exa..

Answer / 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

What is the difference between Userdefined function and stored procedure? Explain and give the exa..

Answer / manoj

1. function always run with select command while stored
procedure execute with execute command

2. function not provide output parameter facility
while stored procedure provide output facility

3. function always execute means it execute more than one
time while store procedure execute only one time

Is This Answer Correct ?    1 Yes 1 No

What is the difference between Userdefined function and stored procedure? Explain and give the exa..

Answer / ashish

Please check out the below link. I think it may be useful:

http://newtechnobuzzz.blogspot.in/2014/07/difference-between-user-defined-funtion.html

Is This Answer Correct ?    0 Yes 0 No

What is the difference between Userdefined function and stored procedure? Explain and give the exa..

Answer / anil sharma

Userdefined function can used in select statement.

It must return a values but in store procedure it is
optional.

Store procedure can use using sqlparameter but in
userdefined function it is not used.

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More SQL Server Interview Questions

How many cores do I need for sql server 2016?

0 Answers  


what is cursor?why we will go to cursor?advantages &disadvantages of cursors?

1 Answers  


What are the triggers in sql?

0 Answers  


What are primary keys and foreign keys?

4 Answers  


Difference between uniqe index and uniqe constraint?

0 Answers  


How many index keys possible for a table

6 Answers  


Can we create SP inside SP ? If no Y ? If yes Y ? Explain with an example ?

3 Answers   IBM, L&T,


Explain boyce and codd normal form(bcnf)?

0 Answers  


how to know description of a table in sqlserver 2000

8 Answers  


statement (of account) Receive ID_receive Date_receive Amount_receive TO_receive From_receive Description_receive 1 2010/01/01 500 Bank Ahmed Payment from the account 2 2010/02/01 700 Bank Ahmed Payment from the account Payment ID_payment Date_payment Amount_payment From_payment To_payment Description_payment 1 2010/03/01 1000 Ahmed Sales Sale goods 2 2010/04/01 1500 Ahmed Sales Sale goods How can crate Stored Procedures for the statement (of account) from these tables? I want statement (of account) like this: (in sql 2005) ID_ name description debit account credit account balance

1 Answers  


How to define the name and server for a new dsn?

0 Answers  


What is perspective, have you ever created perspective? : sql server analysis services, ssas

0 Answers  


Categories