ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ASP.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
diffrance between stored procedure & function in sql server?
 Question Submitted By :: Sunita Apte
I also faced this Question!!     Rank Answer Posted By  
 
  Re: diffrance between stored procedure & function in sql server?
Answer
# 1
Function can be used in an expression but we cann't use
procedure in an expression
 
Is This Answer Correct ?    3 Yes 0 No
Pramod Prakash
 
  Re: diffrance between stored procedure & function in sql server?
Answer
# 2
Difference between function and stored proc:
========================================================

Stored Procedure :supports deffered name resoultion Example 
while writing a stored procedure 

that uses table named tabl1 and tabl2 etc..but actually not 
exists in database is allowed 

only in during creation but runtime throws errorFunction 
wont support deffered name 

resolution. 
2. Stored procedure returns always integer value by default 
zero. where as function return 

type could be scalar or table or table values(SQL Server).
3. Stored Procedure is pre compiled exuction plan where as 
functions are not.
4. Stored Procedure retuns more than one value at a time 
while funtion returns only one 

value at a time.
5. We can call the functions in sql statements (select max
(sal) from emp). where as sp is 

not so
6. Function do not return the images,text whereas sp 
returns all.
7. Function and sp both can return the values. But function 
returns 1 value only.
procedure can return multiple values(max. 1024) we can 
select the fields from function. in 

the case of procdure we cannot select the fields.
8. Functions are used for computations where as procedures 
can be used for performing 

business logic
9. Functions MUST return a value, procedures need not be.
10. 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.
11. Function parameters are always IN, no OUT is possible
 
Is This Answer Correct ?    3 Yes 0 No
Dev
 
 
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
What is the difference between a Stored procedure and function?  6
Types of configuration files and their differences ? Accenture1
What?s the difference between Codebehind="MyCode.aspx.cs" and Src="MyCode.aspx.cs"? Visual-Soft1
what is generics? Microsoft2
What data types do the RangeValidator control support?  2
what to magage the state manament in asp.net with respect to in_prock and out_prock Aviva1
What is the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"? Innvectra1
what is the assembly?  2
What is viewstate? Microsoft3
What is reflection and disadvantages of reflection ? Microsoft1
what is CTS? PrimeLine3
what is <location> tag?  2
what is session ?how sessions are handeled in application? write the clauses of sql server in their order. Olive-Tech2
what is caching? Microsoft2
What does this do? gacutil /l | find /i about  1
What are session variables? Microsoft2
How do you add a javascript function for a link button in a datagrid? Microsoft2
Which color scheme in a Repeater control can you provide alternatively?  1
What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?  2
all asp.net interives questions  1
 
For more ASP.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com