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                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
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
i want to join two queries....and i want to run them as one 
after another that is want output of first query then 
second , then again output of first query then second and 
so on...
 Question Submitted By :: Mayu
I also faced this Question!!     Rank Answer Posted By  
 
  Re: i want to join two queries....and i want to run them as one after another that is want output of first query then second , then again output of first query then second and so on...
Answer
# 1
declare @i int
set @i=1
while @i < 100
begin
if (@i)%2 =1
begin
select * from TABLE1
end
else
select * from TABLE2
set @i=@i + 1
end
 
Is This Answer Correct ?    2 Yes 1 No
Ashna Thampi
 
  Re: i want to join two queries....and i want to run them as one after another that is want output of first query then second , then again output of first query then second and so on...
Answer
# 2
DECLARE @i int
SET @i=0
While @i<10
Begin
 if @i%2=0
  BEGIN
     SELECT * FROM Table1
  END
 ELSE
  BEGIN
     SELECT * FROM Table2
 END
END
 
Is This Answer Correct ?    0 Yes 0 No
Vrinda
 
 
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
How will u get 5 years back record?  4
There is table like Events...in that name ,startdate ,enddate,location are the column names write a stored Procedure for this table to get events by Months "GetEventsByMonths"  1
How many index keys possible for a table  6
When do we use the UPDATE_STATISTICS command?  3
what is the purpose of creating view is sql server 2000 Wipro9
What is a join and their types? Challenger-Financial2
What is the datatype returned by count(*) Asian-CERC18
What is a trigger?  3
Which institute is best for SQL Server 2005 Training?  5
Explain the storage models of OLAP?  1
plz tell me the new features of sqlserver2000,sqlserver2002,sqlserver2005  3
What is the difference between distinct clause and group by clause? Value-Labs1
Name three version of sql server 2000 and also their differences?  1
what is the difference between Delete and Truncate Geo-Research-Centre3
what are batch in sql server? Satyam2
What is the diff between Static Queries and Dynamic queries give me some examples CSC1
About Indexed Views? with example? plz reply...  2
Why Do you want to work in this company? HCL3
create index a on employee(dno) In this,which index was created?  2
How to display n-1 columns from n number of columns, from a single table in MS SQL server 2005?  1
 
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