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 / john

select * from table1
union
select * from table2

-- Union will give distinct value of both tables

Is This Answer Correct ?    38 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does man by sql wildcard characters in sql server?

497


What is merge statement?

607


What are cursors stored procedures and triggers?

498


What is transaction server consistency?

520


Define right outer join in sql server joins?

497






Explain error and transaction handling in sql server?

479


What is the process of normalization?

528


what is hash nonclustered index

514


What is the difference between a fill factor of 100 and 0?

511


What happens if you add a new index to large table?

494


What is server-level principal?

96


How do I find query history in sql server?

499


what is the difference between openrowset and openquery?

571


What is the data type of time?

493


What are relationships and mention different types of relationships in the dbms

532