Retreive data from 2 tables

I have 2 tables. Table A and Table B. I want to display all the rows from both the tables. can anyone help me on this??

Showing Answers 1 - 3 of 3 Answers

Nikhil Gupta

  • Aug 16th, 2015

  1. SELECT * FROM Table_a union SELECT * FROM Table_b;

It will display all the records present in both tables.

Nikhil Gupta

  Was this answer useful?  Yes


  • Sep 4th, 2015

Use Union ALL

  Was this answer useful?  Yes


  • Sep 5th, 2015

UNION or UNION ALL can be used if all column names are same in both the tables... else use join condition to retrieve data from both the tables if the tables have at least one common column

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions