-
窗口函数用OVER (partition by 列名),不需要group by关键字,
查看全部 -
窗口函数概念。
与分组聚合函数类似,但是每一行数据都生成一个结果。
查看全部 -
set persist global password_history=6
persist 不仅当前生效,重启服务器后仍然有效
是通过新增配置文件mysqld-auto.cnf来达到持久化的目的
查看全部 -
限制重复使用以前的密码
查看全部 -
修改认证方式
查看全部 -
认证插件更新
查看全部 -
用户创建和授权
查看全部 -
账户与安全 优化器索引 json增强
查看全部 -
#使用递归CTE生成斐波那契数列:0,1,1,2,3,5,8,...
#1.限定最大值
with recursive cte(m, n) as (
select 0, 1
union all
select n, m+n from cte where n<100
) select m from cte;
#2.限定位数
with recursive cte(id, m, n) as (
select 0, 0, 1
union all
select id+1, n, m+n from cte where id<10
) select m from cte;
查看全部 -
测试表
create table t3(c1 varchar(10), c2 varchar(10));
create index idx on t3(c1);创建普通索引
create index fun_idx on t3( (UPPER(c2)) );创建函数索引语法,如c2转换为大写的结果作为索引
show index from t3\G
explain select * from t3 where upper(c2) = 'ABC'; 如果没设置函数索引就是where全表查;反之可以走索引,如用户名查询
json建索引 直接建 json会超长,所以 index((CAST(data->>'$.name' as char(30))))
查看全部 -
MySQL5.7自增列bug
查看全部 -
原子DDL操作
查看全部 -
移动平均值
查看全部 -
生成利润累计和
查看全部 -
角色是一组权限的集合
查看全部
举报