MySQL LEFT JOIN
MySQL LEFT JOIN combines two tables and returns the matched records from both tables and unmatched records from the “left” table.
MySQL LEFT JOIN combines two tables and returns the matched records from both tables and unmatched records from the “left” table.
The DISTINCT clause in MySQL is used to fetch the unique records from the table. The DISTINCT is used with the SELECT statement and removes duplicate records from the record-set.
The LIKE operator is used to fetch the records from the table data with the pattern. The LIKE operator is generally used with wildcards; % and _ i.e. percentage and underscore.
MySQL has two types of IFs: one is the IF statement while other is the IF function. In this tutorial, I will explain the difference and show you examples of MySQL IF
If you have a little idea about how if..else..elseif statement works in different programming languages then understanding the MySQL CASE function should be straight-forward.
The COUNT function in MySQL returns the total count of rows returned by SELECT statement. You may use it with the simple SELECT statement to get the count of all rows as single number.
MySQL BETWEEN is used to retrieve records based on the given range. The MySQL BETWEEN operator can be used with SELECT, DELETE..
The ORDER BY clause is used to sort the record-set in ascending or descending order. A few points about the MySQL ORDER BY clause:
The purpose of the GROUP BY clause is to get summarized view of the database table(s). MySQL GROUP BY is used to group the rows with the same values
The MySQL DATEDIFF function returns the number of days between two given dates. The DATEDIFF takes two arguments as shown in the example below..
The IFNULL function replaces the NULL values by given expression. For example:
SELECT IFNULL(NULL, “alt_val”) AS “Alternative Value”;