MySQL SELECT
SELECT Column SELECT * SELECT DISTINCT SELECT COUNT(DISTINCT column_name)
Examples Explained
MySQL WHERE
WHERE Clause Text Fields vs. Numeric Fields
Examples Explained
MySQL AND, OR and NOT
AND OR Another OR NOT Combining AND and OR Combining AND and NOT
Examples Explained
MySQL ORDER BY
ORDER BY ORDER BY DESC ORDER BY Several Columns ORDER BY Several Columns + ASC and DESC
Examples Explained
MySQL NULL Values
IS NULL Operator IS NOT NULL Operator
Examples Explained
MySQL LIMIT
LIMIT LIMIT with WHERE
Examples Explained
MySQL MIN() and MAX()
MIN() MAX()
Examples Explained
MySQL COUNT(), AVG() and SUM()
COUNT() AVG() SUM()
Examples Explained
MySQL LIKE
Select all table rows starting with "a" Select all table rows ending with "a" Select all table rows that have "or" in any position Select all table rows that have "r" in the second position Select all table rows that starts with "a" and ends with "o" Select all table rows that starts with "a" and are at least 3 characters in length Select all table rows that does NOT start with "a"
Examples Explained
MySQL Wildcards
The % Wildcard The _ Wildcard
Examples Explained
MySQL IN
IN NOT IN IN with SELECT
Examples Explained
MySQL BETWEEN
BETWEEN NOT BETWEEN BETWEEN with IN BETWEEN Text Values NOT BETWEEN Text Values BETWEEN Date Values
Examples Explained
MySQL Aliases
Alias for Columns Two Aliases An Alias that contains multiple columns Alias for Tables
Examples Explained
MySQL Joins
INNER JOIN - Join two tables INNER JOIN - Join three tables LEFT JOIN RIGHT JOIN CROSS JOIN Self Join
Examples Explained
MySQL UNION
UNION UNION ALL UNION with WHERE UNION ALL with WHERE
Examples Explained
MySQL GROUP BY
GROUP BY GROUP BY and ORDER BY GROUP BY with JOIN
Examples Explained
MySQL HAVING
HAVING and GROUP BY HAVING and ORDER BY HAVING and WHERE
Examples Explained
MySQL EXISTS
EXISTS - Price less than 20 EXISTS - Price equals 20
Example Explained
MySQL ANY and ALL
ANY - Example 1 ANY - Example 2 ANY - Example 3 ALL - Example 1 ALL - Example 2
Examples Explained
MySQL CASE
CASE 1 CASE 2
Examples Explained
MySQL Comments
Single line Comment Single line comment at the end of a line Single line comments to ignore statement Multi line comment Multi line comment to ignore many statement
Examples Explained
MySQL Database
MySQL Database tutorials can be found here:
MySQL Create DB MySQL Drop DB MySQL Create Table MySQL Drop Table MySQL Alter Table MySQL Constraints MySQL Not Null MySQL Unique MySQL Primary Key MySQL Foreign Key MySQL Check MySQL Default MySQL Create Index MySQL Auto Increment MySQL Dates MySQL Views