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

Describe triggers features and limitations?

594


What are the basic functions for master, msdb, model, tempdb databases?

672


How to access the deleted record of an event?

654


What are the steps you can take to avoid “deadlocks”?

608


What is difference between getdate and sysdatetime in sql server 2008?

686






How do you delete a data source?

654


How to reaname table name without using sp_Rename in sql server..?

624


How to list all stored procedures in the current database using ms sql server?

721


What is the importance of three tier architecture?

704


What is the difference between ddl and dml?

671


what's sql server? : Sql server database administration

579


How to list all login names on the ms sql server?

622


How to provide default values to function parameters?

676


How to create new tables with "select ... Into" statements in ms sql server?

581


What are system databases in ms sql server?

607