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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
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
how many type of subquery?
 Question Submitted By :: Rabinmeher
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how many type of subquery?
Answer
# 1
As database developer, you must have ever written 
subqueries in either SQL Server or any other database 
platform. This article will describe shortly about types of 
subquery.

  
A subquery is inner query that will be used by outer query. 
A subquery could return scalar value or a series of value. 
Based on query dependency, a subquery could be self-
contained or correlated one. A self-contained subquery is a 
subquery independent from outer query, and correlated 
subquery is a subquery that is referencing to a row in 
outer query.

  
Self-contained subquery is easier to debug than correlated 
subquery. And it is executed only once whereas correlated 
subquery is executed once for each row of outer query.

  
Sample of self-contained subquery that returns scalar value 
is shown below :

  
Select customerid

From dbo.orders

Where employeeid = (select employeeid from dbo.employees 
where lastname = ‘RAJ’);

  
This query returns customers list whose employee is RAJ.
 
Is This Answer Correct ?    7 Yes 1 No
Rajkumar
 
  Re: how many type of subquery?
Answer
# 2
2
 
Is This Answer Correct ?    3 Yes 1 No
Somu
 
 
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
Plz tell about backup&recovery?  2
About Indexed Views? with example? plz reply...  2
What is the difference between SSAS 2000 and SSAS 2005? APX1
write the query for find the top 2 highest salary in sql server TCS23
How to select nth record from a table? DELL9
What are user defined datatypes and when you should go for them?  1
i have a table #temp1(id, Name groupname ) and record like this 1 R1 S 2 R3 S 3 R2 S 4 R4 D 5 R5 D 6 R6 K 7 R7 K 8 R8 L 9 R9 L 10 R10 L 11 R11 K and i want to display record based on user defind sorting order e.g. 1 R4 D 2 R5 D 3 R6 K 4 R7 K 5 R11 K 6 R1 S 7 R3 S 8 R2 S 9 R8 L 10 R9 L 11 R10 L  4
What value could be assigned to Varchar Type?  3
What is the difference Between Sql-server 2000 & 2005 Value-Labs2
What is an extended stored procedure? Can you instantiate a COM object by using T-SQL?  1
How to Display, Amount of Disk Activity Generated by Transact-SQL Statements?  1
what is the out put of below queries? a. select * from Emp where null = null; b. select * from Emp where 1=1; Patni9
How can I create a plain-text flat file from SQL Server as input to another application?  2
how many joins we can write if at all we have n no of tables Tanla-Solutions4
what is physical sort data and logical sort data in index?  2
How to count the number of duplicate items in a table?  1
What are the advantages of using sql server over ms access or why should one use sql instead of ms access Impetus1
what is maximum size of temp db? iSoft4
What do you mean by COLLATION?  4
what is the importence of the trigger in sqlserver2000? ATI1
 
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