1.想要在命令提示符下操作mysql服務器,添加系統變量。(計算機-系統屬性——環境變量——path)
2.查詢數據表中的數據;
select selection_list select * /columns
from table_list from table1/table2
where primary_constraint
group by grouping_columns
order by sorting_colomns desc降序 select * from table order by id desc;
having second_constraint
limit count select * from table where id limit 1,4;
2 常用的統計函數:avg(字段),sum(字段),count(字段),min(字段),
select sum(字段2) as 別名 ,字段1 from table group by 字段1;
3 算數運算,字符串,以及邏輯運算構造表達式:select * (price*0.8) as '80%' from table;打八折