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

Answers were Sorted based on User's Feedback



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 s..

Answer / guru

Union gives the result in two records

We have to use cross join like below



select * from table1,table2

Is This Answer Correct ?    0 Yes 8 No

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 s..

Answer / vivek

select col1,col2 from table1 union table2

Is This Answer Correct ?    0 Yes 14 No

Post New Answer

More SQL Server Interview Questions

What are the diifferences between the ms sql server vs mysql?

0 Answers  


Define inner join in sql server joins?

0 Answers  


How can a database be repaired?

0 Answers  


Benefits of Stored Procedures?

0 Answers   Wipro,


How do you find the error, how can you know the number of rows effected by last SQL statement?

1 Answers  






What is ms sql server reporting services?

0 Answers  


Can we insert data if clustered index is disabled?

0 Answers  


What to check if a User database is locked?

0 Answers   TCS,


What is the difference between Procedure and Function

4 Answers   Accenture, Nagarro, TCS,


How do we rollback the table data in SQL Server

3 Answers  


How can we write or define DDL statements in Sql server and DML statements?

3 Answers  


what is difference between having and where clause ?

3 Answers  


Categories