1. Union merging of two or more SELECT statements
2.year (now ())-year (sbirthday) Get current Age
3.order by sort default positive order desc reverse
4.group by grouping having a conditional judgment on group by data only
COUNT (*): Counts the number in a group, usually with "*" Parameters
Max (field name): Gets the maximum value in the Group for this field.
Min (field name): Gets the minimum value in the Group for this field.
sum (field name): Gets the sum of the fields in the group.
AVG (field name): Gets the average of the field in the group.
5. Like (Fuzzy Lookup): Grammatical form: xx as ' the character to look for '
% represents any number of arbitrary characters
_ represents any character of 1
6. Limit:
select * FROM table limit M,n
where m refers to the beginning of the record index, starting from 0, indicating the first record
n means starting from section m+1 and taking N.
SELECT * FROM tablename limit 2,4
Take out 3rd to 6th, 4 records
7. The difference between or and and
Or:or is ' or ' meaning, as long as one of the conditions is established.
And:and is ' with ' meaning, juxtaposition, two conditions to be set up
MySQL Common syntax