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

What is row_number () and partition by in sql server?

620


What is the difference between char, varchar and nvarchar?

671


What is the use of “join” in sql server?

652


Can we make the the chages By Using the Sql if u know any function or process please inform me Actuall result: BRK1 Break 1 Part 1 00:01:00:00 60 BRK1 Break 1 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 BRK2 Break 2 Part 2 00:01:00:00 60 BRK2 Break 2 Part 3 00:01:00:00 60 BRK3 Break 3 Part 1 00:01:00:00 60 BRK3 Break 3 Part 2 00:01:00:00 60 Desired O/P: BRK1 Break 1 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 Part 3 00:01:00:00 60

1820


Write a query to find 5th highest amount paid from the customer table.

613






Which are the new data types introduced in sql server 2008?

593


What is star, snowflake and star flake schema? : sql server analysis services, ssas

743


How to add more data to the testing table in ms sql server?

643


What are the differences between ms sql server & oracle?

635


What is 2nf normalization?

637


How to use "begin ... End" statement structures in ms sql server?

601


How does normalization work?

595


Do you know clustered and non-clustered index?

630


Is it important for a database administrator to understand the operating system and file access?

597


Give me any three differences between Truncate and Delete.

660