There is a table1 with records (1,2,3,4,5,6) and table2
with records (4,5,6,7,8,9).write a query so as to get the
result as 1,2,3,4,5,6,7,8,9

Answer Posted / naveen

For Oracle it would be

select * from table1
union all
select * from table2

if you will use

select * from table1
union
select * from table2

it will give you double rows those are common in both the
tables.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

State the difference between union and union all?

507


How do you Implement SSIS Packages in your Project?

1501


In what sequence sql statement is processed?

573


What is a natural primary key?

508


What are the types of lock supported by ?

600






What is the purpose of sql profiler in sql server?

497


What are drillthrough reports?

100


What is reference section?

485


How to declare a cursor with "declare ... Cursor" in ms sql server?

554


what is the difference between openrowset and openquery?

576


Can we insert data if clustered index is disabled?

500


What is the syntax for encrypting a column in SQL Server?

544


What is key set driven?

524


What is difference between primary key and foreign key?

472


What is the stuff?

516