I am assuming this is what you are looking for: SELECT * FROM table1 INNER JOIN table2 ON table1.id = table2.id
here is inner join SELECT t1.name, t2.salary FROM employee AS t1 INNER JOIN info AS t2 ON t1.name = t2.name;
Tizag has some good examples - http://www.tizag.com/mysqlTutorial/mysqljoins.php http://www.tizag.com/mysqlTutorial/mysqlleftjoin.php
we can using "JOIN", "LEFT JOIN", "RIGHT JOIN" to join the one tables and the data from multiple tables by single query. Here i have joined 3 tables in one query SELECT e.name,g.name,c.name FROM employee as e LEFT JOIN group as g USING(`group_id`) LEFT JOIN company as c USING( `company_id` )