摘要: 启动 redis-server 文件路径 登录 ./bin/redis-cli -p 16379 默认端口在redis-conf下面配置 set k1 v1 设置 get k1 查看 select 库(数字为0-15共计16个库) keys * 查看共计有多少 flushDB 删除当前库的key f 阅读全文
posted @ 2021-08-10 17:29 温柔他 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-07-13 17:02 温柔他 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 大于30号部门最高工资的所有员工信息(2种写法) select * from emp where sal>all(select sal from emp e2 where deptno=30) select * from emp e where sal>(select max(sal) from e 阅读全文
posted @ 2021-07-13 14:30 温柔他 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-07-12 16:58 温柔他 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 1、--单个主键create table student( id int primary key, name varchar(50)); 2、--联合主键 create table student( id int, classid int, name varchar(50), primary key 阅读全文
posted @ 2021-07-07 20:22 温柔他 阅读(37) 评论(0) 推荐(0) 编辑
摘要: select sal+ifnull(comn,0) as total from emp 如果comn值为null直接将值替换为0与sal相加,如果不为null就有原值与sal相加 as是相加的加过列名称叫total order by 列名 asc(默认升序) desc降序 查询所有雇员,按月薪降序排 阅读全文
posted @ 2021-07-05 17:51 温柔他 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-07-05 14:57 温柔他 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-07-05 13:45 温柔他 阅读(18) 评论(0) 推荐(0) 编辑
摘要: create database mydb1; create database mydb2 character set gbk; create database mydb3 character set utf8 collate utf8-general-ci; 阅读全文
posted @ 2021-07-05 11:00 温柔他 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-07-05 10:33 温柔他 阅读(12) 评论(0) 推荐(0) 编辑