answersLogoWhite

0


Best Answer

You can simply do this:

Say you have two tables - employee and phone

INNER JOIN

select employee.first_name, employee.last_name, phone.home_number from employee, phone where phone.employee_id = employee.employee_id;

OR

select employee.first_name, employee.last_name, phone.home_number from employee join phone on phone.employee_id = employee.employee_id;

LEFT JOIN

select employee.first_name, employee.last_name, phone.mobile_number from employee left join phone on phone.employee_id = employee.employee_id;

RIGHT JOIN

select phone.fax_number, employee.first_name, employee.last_name from phone right join employee on phone.employee_id = employee.employee_id;

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you JOIN two tables in MySQL?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is schema in mysql?

Schema is structure you created for your tables in My SQL


What is a join line in access?

the line joining two tables


When you want to extract data from two or more tables you use an query?

When you want to extract data from two or more tables, you can use a SQL JOIN query. By using JOIN clauses, you can combine rows from different tables based on a related column between them. This allows you to retrieve data from multiple tables in a single query.


What is difference between natural join equijoin and outer join?

Equijoin - Joins two or more tables where the specified columns are equal. Returns only those records found in both tables. Outer join - Joins two or more tables on the specified columns, returning all the values from table 1 regardless of whether they are in table 2. Natural Join - Joins two tables on all like column names.


Line between selected fields in two tables?

join line


What does the Join SQL clause feature in computer programming?

A Join SQL clause is a combination of two or more tables from a database. Fields are joined by using data that is present in both tables and are written as an identification for the join.


Find records in two tables that have identical values in the matching fields?

join


What is A line that Access draws between matching fields in two tables?

Join Line


What query do you use to extract data from two tables?

You would use a JOIN query for this.


What is a line that is drawn between matching fields in two related tables?

Join Line


Is a line that Access draws between matching fields in two tables?

Join Line


What are HEAP tables in MySQL?

Heap is no longer the accepted term for these kinds of tables in MySQL but it is still supported for backwards compatibility. The new accepted term is Memory and as the name suggest, Memory tables store their data directly in memory. Memory tables are used primarily as temporary tables. When you delete a row from a memory table, you do not free up space in the server memory. Space is only freed once the table is deleted.