学习mysql之后的一点总结(基础)
所属分类:
数据库 / Mysql
阅读数:
281
收藏 0赞 0分享
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;打八折
mysql found_row()使用详解
在参考手册中对found_rows函数的描述是:
it is desirable to know how many rows the statement would have returned without the LIMIT.
也就是说,它返回值是如果SQL语句没有加LI
收藏 0赞 0分享
很全面的MySQL处理重复数据代码
这篇文章主要为大家详细介绍了MySQL处理重复数据的实现代码,如何防止数据表出现重复数据及如何删除数据表中的重复数据,感兴趣的小伙伴们可以参考一下
收藏 0赞 0分享
忘记MySQL的root密码该怎么办
忘记密码总是一件令人头疼的事情,当我们忘记了MySQL的root密码该怎么办?本文给出解决方法,感兴趣的小伙伴们可以参考一下
收藏 0赞 0分享
查看更多