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 a Stored procedure and function?

Answers were Sorted based on User's Feedback



What is the difference between a Stored procedure and function?..

Answer / sanjay das

Function allways returns value but stored procedure may or
may not return value.

Is This Answer Correct ?    15 Yes 0 No

What is the difference between a Stored procedure and function?..

Answer / viren chakraborty

a stored procedure is better when returning one or more
rows.
a function is better when returning a single scalar value.
function and procedure, both can accept parameters and both
also support output parameters.
for programmers, stored procedures are the way to go
because they directly return the result of a given select
statment.
in a function you will explicitly have to return a value
using return statement and returning more than 1 value
using a function is much more complicated.
the procedure is capable of doing all kinds of things
(select/insert/update/delete) and hence, it is better

Is This Answer Correct ?    6 Yes 0 No

What is the difference between a Stored procedure and function?..

Answer / orknob ghosh

Stored procs can't be called within function but function
can be called within stored procedures.

Stored proc can have DML statements whereas a fuction can't

Is This Answer Correct ?    2 Yes 0 No

What is the difference between a Stored procedure and function?..

Answer / pandian

1.Stored Procedure WE can call Independ using Exec
statement but function always depend on sql statement

Is This Answer Correct ?    1 Yes 1 No

What is the difference between a Stored procedure and function?..

Answer / preetam

Proceudure is pre Compiled Query but function is not

Is This Answer Correct ?    0 Yes 0 No

What is the difference between a Stored procedure and function?..

Answer / madhavi latha

stored procedute can return only one integer value.while
function can return more than one value.

we can not use select statement with storedprocedures like
select <spname> where as UDF can.

storedprocedures can not return tables.where as UDF can
return more than one tables.

we can use functions inside the stored procedure but in UDF
we can not use storedprocedures.

Is This Answer Correct ?    2 Yes 7 No

What is the difference between a Stored procedure and function?..

Answer / ruchi aggarwal

1.Functions can be used in select, where or case statement
whereas sp cannot.
2.In Functions we cannot modify the base table information.
DML statements cannot be used.
3.In Function non deterministic funstions are not used
whereas we can use them in sps eg:GETDATE
4.No Multiple result sets can be returned from function
whereas we can do this in sp.
5.Error handling is restricted. RAISERROR and @@ERROR are
invalid from inside User Defined Functions

Is This Answer Correct ?    0 Yes 5 No

What is the difference between a Stored procedure and function?..

Answer / kautilya

stored procedure can not take paramateres while function
can produce results as per the values passed to it and
functions returns value

Is This Answer Correct ?    4 Yes 10 No

What is the difference between a Stored procedure and function?..

Answer / janardan baghla

1.stored proceudures can not return tables whereas
functions can.
2.stored procedures can not used in select statemnet
whereas functions can.

Is This Answer Correct ?    3 Yes 9 No

Post New Answer

More ASP.NET Interview Questions

In Data grid the question is below quantity price total these are 3 fields available in data grid if you enter quantity the total has to update automatically.Price field is already filled completely

0 Answers   Quest,


Types of authentications in ASP.NET ?

9 Answers   Accenture, Roland, Shriram,


Can viewstate be accessed in another page?

0 Answers  


What is view state and how this can be done and was this there in asp?

11 Answers   Accenture, KDOT, Mphasis,


Differentiate an ADO.NET Dataset and an ADO Recordset with its functionality?

3 Answers   Siebel,


What are directives in asp.net? List down all the important directives.

0 Answers  


How does session work?

0 Answers  


Which color scheme in a Repeater control can you provide alternatively?

1 Answers   Siebel,


Explain the difference between Web Garden and Web Farm?

0 Answers   Sans Pareil IT Services,


What is dataset and uses of dataset ?

6 Answers   HCL, TCS,


what is diff between responseexpires and expiresabsolute

2 Answers   Accenture,


What property is used on the datatable to indicate a conflict after an update? a) HasConflict b) HasError c) HasCollision d) HasDataError

1 Answers   Syntax Softtech,


Categories