- MySQL Cross Join
The CROSS JOIN is used to join all rows from one table to all rows of another table.
- MySQL Right Join
The RIGHT JOIN clause is used to join multiple tables, return all rows from the right table(table2) and the matched rows from the left table(table1). Non matched rows from table1 will return nulls. Here we are going to use RIGHT JOIN to show customers and their addresses.
- MySQL Left Join
The LEFT JOIN clause is used to join two or more tables together. The main table will return all of its rows and the matching rows from the joining tables. If the joining tables don’t have the matching rows then MySQL will use NULL to represent those rows. Basically, you are getting everything from…
- MySQL Join
The INNER JOIN is used to query join multiple tables together. The join condition must match column values from both tables. Basically you are getting what both tables have in common. Here we are joining the customer table and the address table to show the customer address details. For each row in…
- MySQL Order By
The ORDER BY clause is used to sort the result set which is not sorted by default. You can sort the result set by one or multiple columns and either in the ascending or descending order. ASC – sort in ascending orderDESC – sort in descending order* by default if [ASC|DESC] is omitted then […]