- 博客(8)
- 收藏
- 关注
原创 Redis
SETEX key seconds value //设置指定的key值,并设置key的过期时间。HSET key field value // 将哈希表中key的field设置为value。SETNX key value //只有在key不存在时设置key的值。HGET key field //获取存储在key中field字段。HDEL key field //删除存储在key中的字段。SMEMBERS key //返回集合中的所有元素。
2025-01-08 20:59:15
571
原创 Mysql(4)
select * from user where (job,salary) in (select job,salary from user where name = '鹿杖客' or name = '宋远桥');select * from user where salary > any(select salary where id = (select id from dept where name = '研发部'));select 字段列表 from 表1 inner join 表2 on 连接条件;
2025-01-06 16:10:23
1474
原创 Mysql(3)
alter user '用户名'@'主机名' identified with mysql_native_password by '新密码';create user '用户名'@'主机名' identified by '密码';revoke 权限列表 on 数据库名.表名 from '用户名'@'主机名'grant 权限列表 on 数据库名.表名 to '用户名'@'主机名';show grants for '用户名'@'主机名'drop user '用户名'@'主机名';任意主机用‘%’表示。
2025-01-06 11:31:44
129
原创 Mysql(2)
insert into 表名(字段1,字段2,字段3) values(值1,值2,值3),(值1,值2,值3),(值1,值2,值3);insert into 表名 values(值1,值2,值3),(值1,值2,值3),(值1,值2,值3),(值1,值2,值3);//age升序,id降序。
2025-01-05 12:06:21
1300
原创 Mysql(1)
数值类型,tinyint,smallint,mediumint,int,bigint。alter table 表名 add 类型(长度) [comment ''];alter table 表名 change 旧字段 新字段 类型长度;name varchar(32) comment '姓名',gender varchar(1) comment '性别'字段1 字段1类型[comment 字段1 注释],字段2 字段2类型[comment 字段2 注释],字段3 字段3类型[comment 字段3 注释],
2025-01-04 19:53:59
1324
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人