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       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
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 a sub-query? When would you use one?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is a sub-query? When would you use one?
Answer
# 1
Subquery is used to get information from a table based on 
unknown conditions.
If select stmt not perform entire task using 
selection,projection,and joins then we can perform that 
type of task using sub queries.
 
Is This Answer Correct ?    1 Yes 4 No
Swapna
 
  Re: What is a sub-query? When would you use one?
Answer
# 2
A subquery is a SELECT statement that is nested within 
another T-SQL statement. A subquery SELECT statement if 
executed independently of the T-SQL statement, in which it 
is nested, will return a result set. Meaning a subquery 
SELECT statement can standalone and is not depended on the 
statement in which it is nested.

Sometimes the criteria for determining which set of records 
will be affected by a SELECT, UPDATE, DELETE and/or INSERT 
statement cannot be obtained by hard coding the selection 
criteria. Occasionally there is a need to use the results 
of a SELECT statement to help determine which records are 
returned or are affected by a T-SQL statement. When a 
SELECT statement is used inside another statement, the 
inside SELECT statement is known as a subquery.
 
Is This Answer Correct ?    5 Yes 0 No
Mkd
 
 
 
  Re: What is a sub-query? When would you use one?
Answer
# 3
sub query is part of main query.this useful we retrive data
from the another table.
 
Is This Answer Correct ?    0 Yes 0 No
C Suresh Kumar
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
How reterive duplicate value in SQL?  5
How to select Distinct columns from the table, table having 20 columns and i want all coulmns Wipro3
WRITE A FUNCTION TO DISPLAY THE OUTPUT OF AN EXISTING TABLE RANGE LIKE COMMAM SEPERATED VALUES LIKE RANGE1,RANGE2,... TVS2
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
How to find the date and time of last updated table?  2
Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?  2
what is index seek and index scan?  2
Differences between functions and stored procedures? 247Customer6
What is the difference between two queries: 1. SELECT * FROM table WHERE 1=1; 2. SELECT * FROM table HP15
What should we do to copy the tables, schema and views from one SQL Server to another?  3
I am having table Title with TITLE id,Author ID, Publiser ID , table AUTHOR with Author ID, Author Name, table PUBLISER with Pub ID, Pub name Here hot to find out the publiser id who have relesed the books of patriticular author?  3
When you first load SQL SERVER you will startup with what all databases? CompuSol3
hi, i have a table called names and field name select * from names name a b c d i want to display like this name a,b,c,d how it is possible Regards Baiju  3
Please get the 4 th maximum salary from a table without using any sql keyword (TOP,MAX are mot allowed)  5
system date format is "yy-mm-dd" "select getdate()" ----> 2009-01-24 20:03:28.513 if i write "select dateadd(dd,2,getdate()) ".it returns "2009-01-26 19:59:38.340"...my question is dat could it be possible to retrive da date in da format "26 jan 2009 ...."??  8
event classes in sql server Accenture1
What is an extended stored procedure? Can you instantiate a COM object by using T-SQL? HCL3
What is row by row processing ?  1
What is the difference between Drop and Truncate  10
in tabase table having a column in it empname field is there which having 5 duplicate values is there i want deleted all the duplicates i want showing only one name only.  7
 
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