![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MYSQL
文章平均质量分 51
public static void m
活到老,学到老
展开
-
mysql何时会走索引
5.5.28版本访问类型,这里只列出最常见的6种类型all,index,range,ref,eq_ref,consthttps://blog.csdn.net/dennis211/article/details/78170079不要在索引列上进行运算或使用函数 小心隐式类型转当id为varchar类型select * from article where id = 100,不走索引当id为int类型select * from article where id = "100",原创 2022-01-07 10:21:27 · 622 阅读 · 0 评论 -
Oracle/mysql查询语句的执行过程
执行顺序 from on join/pivot/unpivot where group by having select distinct order by 书写顺序select distinct <select_list> from <left_table> <join_type>join <right_table> on <join_condition>原创 2020-10-09 20:58:11 · 445 阅读 · 0 评论 -
日期时间总结
今天总结一下日期时间如何处理,方便以后查看。 1 Oracle 1.1 日期格式参数及其含义说明 Oracle不区分大小写,所以下面参数大小写都可以D 一周中的星期几 DAY 天的名字,使用空格填充到9个字符 DD 月中的第几天 DDD 年中的第几天 DY 天的简写名 IW ISO标准的年中的第几周 IYYY ...原创 2018-11-10 16:29:57 · 398 阅读 · 0 评论 -
mysql常用函数总结
聚合函数count使用方式有4种select count(*) from tb_student_grade;--统计总行数select count(0) from tb_student_grade;--统计总行数,括号里面的0表示什么意思?select count(id) from tb_student_grade;--统计列id不为null的总行数select count(distinct id) from tb_student_grade;--统计id不为null并且去掉id重复的总原创 2022-01-06 16:26:13 · 362 阅读 · 0 评论 -
Oracle/mysql联合查询union、union all
使用场景 union、union all关键字用户将两个select查询结果集合并成一个结果集,例如:一个旧系统使用a表,同样的信息但是新系统使用了b表,这时候可以使用union或者union all关键字将旧系统和新系统的数据合并显示。 union和union all的相同点和不同点 相同点:都是对两个查询结果集进行并集操作。 不同点:union会合并重复的行,而union ...原创 2019-05-13 20:07:01 · 2147 阅读 · 0 评论