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

When multiple after triggers are attached to sql table, how to control the order of execution?

744


What are the default system databases in sql server 2000?

694


How can you append an identity column to a temporary table?

633


How can we improve performance by using SQL Server profiler?

746


What is the purpose of grouping data in a report?

724






How to encrypt data between dialogs?

768


1 01 101 01010

1804


How does index makes search faster?

765


What is explicit cursors?

735


What are temporal tables in sql server 2016?

654


Explain what is scheduled job and how to create it?

720


Can you explain the disadvantages/limitation of the cursor?

676


Do you know what is sql injection?

721


Can two tables share the same primary key?

684


What is the default value of an integer data type in sql server 2005?

749