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...
Answers were Sorted based on User's Feedback
Answer / ashna thampi
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 ? | 4 Yes | 1 No |
Answer / vrinda
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 | 1 No |
What is the most common type of join?
difference between Clustered index and non clustered index ?
How to create an multi-statement table-valued function?
How you would rewrite the sql query to return the customerid sorted numerically?
What are triggers? How do you invoke a trigger on demand?
It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio
what is the diffrence between Snap Shot and Transaction Replication
Your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files?
What is not null constraint?
What is built-in function?
Explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?
How to use values from other tables in update statements in ms sql server?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)