Combine two or more query using UNION - Mysql Views : 679
Tagged in : Mysql
Send mail vote down 0 vote down 0
If we want to display a content of two or more tables which are ideal to each other. Then there is no need to use separate queries
like


select id,name from table1;
select id,name from table2;
select id,name from table3;

It can be done by a single query


select id,name from table1 UNION select id,name from table2 UNION select id,name from table3;

By - Vinoth, On - 2009-02-04




    Login to add Comments .