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;
Schema is structure you created for your tables in My SQL
the line joining two tables
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.
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.
join line
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.
join
Join Line
You would use a JOIN query for this.
Join Line
Join Line
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.