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

What is the optimal disk configuration for a database server and what raid configurations would you use if budget is not a constraint?

489


Does group by sort data?

518


Do you know what is lock escalation?

594


What sql server means?

564


How to insert a new row into a table with "insert into" statements in ms sql server?

545






What options are available to audit login activity? : sql server security

645


Should you normalize audio?

536


Mention the different types of replication in sql server.

575


Explain how to use linked server?

575


How to drop an existing schema in ms sql server?

605


Differentiate between mongodb vs. Sql server?

597


Difference between group by clause and having clause in SQL?

574


Explain error handling in ssis?

579


How do I run sql server 2014?

518


Explain sql server authentication modes?

621