摘要:
启动 redis-server 文件路径 登录 ./bin/redis-cli -p 16379 默认端口在redis-conf下面配置 set k1 v1 设置 get k1 查看 select 库(数字为0-15共计16个库) keys * 查看共计有多少 flushDB 删除当前库的key f 阅读全文
摘要:
阅读全文
摘要:
大于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 阅读全文
摘要:
1、--单个主键create table student( id int primary key, name varchar(50)); 2、--联合主键 create table student( id int, classid int, name varchar(50), primary key 阅读全文
摘要:
select sal+ifnull(comn,0) as total from emp 如果comn值为null直接将值替换为0与sal相加,如果不为null就有原值与sal相加 as是相加的加过列名称叫total order by 列名 asc(默认升序) desc降序 查询所有雇员,按月薪降序排 阅读全文
摘要:
阅读全文
摘要:
阅读全文
摘要:
create database mydb1; create database mydb2 character set gbk; create database mydb3 character set utf8 collate utf8-general-ci; 阅读全文
摘要:
阅读全文