1 SELECT syntax:
SELECT
column_1, column_2, ...
FROM
table_1
[INNER | LEFT |RIGHT] JOIN table_2 ON conditions
WHERE
conditions
GROUP BY column_1
HAVING group_conditions
ORDER BY column_1
LIMIT offset, length;
2 DISTINCT: Deduplication result set
*Processing of NULL values, only one is reserved.
When using with multiple columns, in this case MySQL uses the combination of all columns to determine the uniqueness of rows in the result set .
3 where syntax
Role: filter the data results of the query.
The comparison operators for filtering expressions in the WHERE clause are as follows:
4 AND
5. OR
**SQL relational operators have high to low priority: not >and> or
eg: