mysql总结
<div id="cnblogs_post_body">学习mysql之后的一点总结1.想要在命令提示符下操作mysql服务器,添加系统变量。(计算机-系统属性&mdash;&mdash;环境变量&mdash;&mdash;path)
2.查询数据表中的数据;
select selection_list select * /columns
from table_list from table1/table2
whereprimary_constraint
group bygrouping_columns
order bysorting_colomns desc降序 select * from table order byid desc;
havingsecond_constraint
limitcount select * from table where id limit 1,4;
2常用的统计函数:avg(字段),sum(字段),count(字段),min(字段),
select sum(字段2) as 别名 ,字段1from table group by 字段1;
3算数运算,字符串,以及逻辑运算构造表达式:select * (price*0.8) as '80%'from table;打八折
页:
[1]