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  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
What is the difference between Stored Procedure , Function 
and Package,
1. how many blocks in Package and what are they.
 Question Submitted By :: Bhaskar
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between Stored Procedure , Function and Package, 1. how many blocks in Package and what are they.
Answer
# 1
1->stored procedure can not be written as a column name but 
function can be written as a column name
2->result set of stored procedure can not be used in 
joining tables but table return by function can be used in 
joins
 
Is This Answer Correct ?    7 Yes 0 No
Scorpio.mishra
[Mm]
 
  Re: What is the difference between Stored Procedure , Function and Package, 1. how many blocks in Package and what are they.
Answer
# 2
1>Stored procedure is pre-executed block of code whereas
function is not.
2>Stored procedure may return zero,one or more than one value
whereas function always return one and only one value..
3>We can use try catch block in stored procedure whereas
function doesn't support try catch block...
4>We can't use stored procedure in select statement whereas we 
use function in select statement..
 
Is This Answer Correct ?    4 Yes 2 No
Bunty_18
 
 
 
  Re: What is the difference between Stored Procedure , Function and Package, 1. how many blocks in Package and what are they.
Answer
# 3
SP may return value or may not ,function always treturn 
value. 
SP cannot use in sselect statment or in sql stattment ,We 
can use Function in any where in sql statment. 
Packeage is set of statment,SP,Function Which run one by 
one statment in that.
 
Is This Answer Correct ?    4 Yes 0 No
Darshan Shah
 
  Re: What is the difference between Stored Procedure , Function and Package, 1. how many blocks in Package and what are they.
Answer
# 4
We cannot write DML in Function whereas in SPs we can
 
Is This Answer Correct ?    0 Yes 2 No
Pratap557
 
  Re: What is the difference between Stored Procedure , Function and Package, 1. how many blocks in Package and what are they.
Answer
# 5
In general SPs are sequential block of PL/SQL for 
Transaction
Func are used for specific calculation / selection
 
Is This Answer Correct ?    2 Yes 0 No
Pratap557
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
What is a sub-query? When would you use one?  3
What about UPDATESTATISTICS ? Intelligroup2
What types of integrity are enforced by a foreign-key constraint  1
What is the difference between truncate and delete statement? CTS4
how to delete duplicate rows from table in sql server HCL8
What is the difference between SSAS 2000 and SSAS 2005? APX1
Explain Active/Active and Active/Passive cluster configurations  1
what is the difference between group and having give an example with query and sample output  2
one table has four field id,name,design,salary. i have to find maximum salary .  6
As a part of your job, what are the DBCC commands that you commonly use for database maintenance? HCL1
hi, how to match retrieve the unmatched records from 2 tables in which we dont have any primary key. example : table1 has 1,2,3,4,5 and table2 has 1,2,3,4,5,6,7,8,9,10 and i want the numbers from 6 to 10 to be displayed and should not come as null. i need the numbers. please reply as soon as possible.  2
Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases?  2
1.can we set the more than 1 primary keys for a table? 2.please give me the difference between Cluster Index and non-Clustered Index 3.can we use query like this "Select * from Table1,Table2;"  6
What is the difference between views and stored procedures? Can we have input parameters for views?  3
Can you explain the types of Joins that we can have with Sql Server?  2
Can Somebody tell me the difference between Clustered & Non- Clustered Index?? Progressive3
i have 4 tables.. T1, T2, T3, T4.. these tables have the same structure and they store the information entered in different years.. T1 stored 2002, T2 stored 2003, T3 stored 2004 and T4 stored 2005.. i want to copy contents in T1 to T2, T2 to T3, T3 to T4 and T4 to T1.. how do i do that? Temp tables cannot be used..  2
can any one please send sql quries most used in applications.  1
how many types of store procedre in sqlserver 2000? ATI2
What is the difference between IN and EXISTS operators in SQL Server? Intelligroup3
 
For more SQL Server 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