redis
发布时间:2024年01月04日
服务器

打开新终端

?
?
Redis数据库操作
Student键值对如下:
zhangsan:{ English: 69 Math: 86 Computer: 77 } lisi:{ English: 55 Math: 100 Computer: 88 } |
根据上面给出的键值对,完成如下操作:
- 用Redis的哈希结构设计出学生表Student(键值可以用student.zhangsan和student.lisi来表示两个键值属于同一个表);
Hmset student.zhangsan English 69 Math 86 Computer 77

Hmset student.lisi English 55 Math 100 Computer 88

- 用hgetall命令分别输出zhangsan和lisi的成绩信息;

- 用hget命令查询zhangsan的Computer成绩;

- 修改lisi的Math成绩,改为95。
文章来源:https://blog.csdn.net/ngc2244/article/details/121535096
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:chenni525@qq.com进行投诉反馈,一经查实,立即删除!