当前位置:网站首页>Redis(一)--Redis入门(2)--Redis数据类型
Redis(一)--Redis入门(2)--Redis数据类型
2022-06-29 18:15:00 【其乐无涯】
Redis数据类型
String - 字符串类型
Hash - Hash类型
List - 列表类型
Set - 集合类型
Zset - 有序集合类型
String 字符串类型

字符串命令

Hash键值类型
Hash类型用于存储结构化数据
Hash命令

List列表类型
List列表就是一系列字符串的“数组”,按插入顺序排序。
List列表最大长度为2的32次方-1,可以包含40亿个元素。
List命令
rpush listkey c b a - 右侧插入
lpush listkey f e d - 左侧插入
rpop listkey - 右侧弹出
lpop listkey - 左侧弹出
lrange listkey 0 -1 - 列出listkey中从开始到末尾所有元素
Set与Zset集合类型
Set集合是字符串的无序集合,集合成员是唯一的。
Zset集合是字符串的有序集合,集合成员是唯一的。
sinter set1 set2 - 交集
sunion set1 set2 - 并集
sdiff set1 set2 - 差集



边栏推荐
- Us judge ruled that the former security director of Uber accused of covering up hacking must face fraud charges
- 3H proficient in opencv (V) - perspective transformation
- Understanding of strong caching and negotiation caching
- 您好,请问mysql cdc、和postgresql cdc有官网样例吗?给个链接学习了
- C Primer Plus Chapter 12_ Storage categories, links, and memory management_ Codes and exercises
- [tcapulusdb knowledge base] tcapulusdb doc acceptance - create business introduction
- Usage of BeanUtils property replication
- Chapter 02_ MySQL data directory
- 数据仓库模型分层ODS、DWD、DWM实战
- [tcapulusdb knowledge base] tcapulusdb doc acceptance - Introduction to creating game area
猜你喜欢
随机推荐
优雅书写Controller(参数验证+统一异常处理)
Mysql database daily backup and scheduled cleanup script
【TcaplusDB知识库】TcaplusDB单据受理-创建业务介绍
Adobe Premiere基础-素材嵌套(制作抖音结尾头像动画)(九)
AMAZING PANDAVERSE:META”无国界,来2.0新征程激活时髦属性
JS converts seconds to "2h30min50s" format
Adobe Premiere foundation - opacity (matte) (11)
对强缓存和协商缓存的理解
Us judge ruled that the former security director of Uber accused of covering up hacking must face fraud charges
svg画圆路径动画
Record that the server has been invaded by viruses: the SSH password has been changed, the login fails, the malicious program runs full of CPU, the jar package fails to start automatically, and you ha
[tcapulusdb knowledge base] tcapulusdb doc acceptance - table creation approval introduction
My first experience of remote office | community essay solicitation
WBF: new method of NMS post filter frame for detection task?
Cannot retrieve repository metadata 处理记录
Adobe Premiere foundation - cool text flash (14)
Apache Doris 基本使用总结
Error building sqlsession problem
How do I add SmartArt to slides in PowerPoint?
6.29 simulation summary









