Learn a point after mysql to summarize the basics of of

  • 2020-05-13 03:35:31
  • OfStack

1. To operate the mysql server at a command prompt, add system variables. (computer-system attributes -- environment variables -- path)

2. Query the data in the data table;

select selection_list select * /columns

from table_list from table1/table2

where primary_constraint

group by grouping_columns

order by sorting_colomns desc descending select * from table order by id desc;

having second_constraint

limit count select * from table where id limit 1,4;

2. Common statistical functions: avg(field),sum(field),count(field),min(field),

select sum(field 2) as alias, field 1 from table group by field 1;

3 arithmetic operations, strings, and logical operations construct expressions: select * (price*0.8) as '80%' from table; 8 discount

Related articles: