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 / sushama kumari

select col1,col2 from table1 union table2 is an incorrect
answer.
Following 2 are corrcet answers:
1.
select * from table1
union
select * from table2
2.

select col1 from table1
union
select col2 from table2

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

please differentiate between delete and truncate?

547


What is identity?

533


Explain multiserver query

539


How to return the date part only from a sql server datetime datatype?

562


What do you mean by data manipulation language?

575






Which tcp/ip port does the sql server run on? How can it be changed?

511


Can I disable or restrict ssrs export formats (rendering formats)?

104


I create a separate index on each column of a table. What are the advantages and disadvantages of this approach? : Sql server database administration

567


What is the usage of the sign function?

517


What are the differences between char and varchar in ms sql server?

565


Why do you need a sql server?

493


what data regions are and what are the different data regions?

101


How to rename an existing column with the "sp_rename" stored procedure in ms sql server?

540


what are user defined datatypes and when you should go for them? : Sql server database administration

526


What is partitioned view?

511