当前位置:网站首页>Command records of common data types for redis cli operations
Command records of common data types for redis cli operations
2022-06-25 18:28:00 【Huang3stone】
This document records the use of redis-cli operation String( character string )、List( Array )、Hash( Hash )、set( aggregate )、sorted set( Ordered set ) The order of .
1. String Data type operations
// Single insert data (set key value)
set name zhangsan
// Bulk insert data (mset key value / key value / ...)
mset name lisi age 13
// Query individual data (mset key)
get name
Bulk query data (mset key / key ....)
mget name age
// Delete data (del key)
del name
2. List Data type operations
// List Data type insertion is divided into left insertion and right insertion , Pay attention to distinguish data List Position in
// Insert left ( You can batch insert ) (lpush name value / value ...)
lpush student zhangsan lisi
// Insert right ( You can batch insert ) (rpush name value / value ...)
rpush student zhangfei guanyu
// Bulk query data (lrange name start end)
// start and end Is the start and end index of the array
// lrange student 0 -1 Query all
lrange student 0 10
// Delete data (del name)
del student
3. Hash Data type operations
// Single insert (hset name key value)
hset user name zhangsan
// Batch insert (hmset name key value / key value /..)
hmset user name zhangsan age 18 set 1
// Single query (hget name key value)
hget user name
// Batch query (hmget name key / key /..)
hmget user name age sex
// Delete (del name key)
del user name
4. Set Data type operations
// insert data ( A disorderly )(sadd name value / value /...)
sadd letters aaa bbb ccc ddd eee
// Batch query (srange letter)
// Check all
srange letters
// Delete data (del letter)
del letters
5. sorted Set Data type operations
// Insert (zadd name value key / value key / ...) adopt value Sort
zadd score 1 zhangsan 8 lisi 10 wangwu 6 zhaoliu
// Inquire about (zrange name start end)
// start end yes set The start and end indexes of the collection
// zrange name 0 -1 Yes, check all
zrange score 0 -1
// Delete (del name)
del score
边栏推荐
- 【深入理解TcaplusDB技术】单据受理之事务执行
- [deeply understand tcapulusdb technology] tmonitor system upgrade
- RMAN备份数据库_管理备份窗口(Backup Window)
- [in depth understanding of tcapulusdb technology] tcapulusdb operation and maintenance doc
- Leetcode force buckle (Sword finger offer 26-30) 26 Substructure of tree 27 Image of binary tree 28 Symmetric binary tree 29 Print matrix 30 clockwise Stack containing min function
- QT中QString包含“\u0000“的处理方式
- 【深入理解TcaplusDB技术】Tmonitor后台一键安装
- Handling method of qstring containing "\u0000" in QT
- [in depth understanding of tcapulusdb technology] tcapulusdb business data backup
- RMAN backup database_ Duplexing backup sets
猜你喜欢
Problems encountered during the use of pychar
LeetCode力扣(剑指offer 26-30)26. 树的子结构 27. 二叉树的镜像 28. 对称的二叉树 29. 顺时针打印矩阵 30. 包含min函数的栈
Basic operation details of binary search tree (BST) (complete code, including test cases)
What is an operator?
Leetcode force buckle (Sword finger offer 26-30) 26 Substructure of tree 27 Image of binary tree 28 Symmetric binary tree 29 Print matrix 30 clockwise Stack containing min function
Anaconda download Tsinghua source
Sword finger offer double pointer
Optimization of lazyagg query rewriting in parsing data warehouse
[in depth understanding of tcapulusdb technology] tcapulusdb construction data
There is a repeating element iii[pruning with ordered ordering]
随机推荐
【深入理解TcaplusDB技术】Tmonitor系统升级
[in depth understanding of tcapulusdb technology] tcapulusdb operation and maintenance doc
. Net worker service adding a serial log record
Batch uploading of local jar packages to nexus private server
【flutter 页面跳转后退如何刷新?】
【深入理解TcaplusDB技术】创建游戏区
【深入理解TcaplusDB技术】Tmonitor后台一键安装
[deeply understand tcapulusdb technology] tcapulusdb import data
什么是泛型以及在集合中泛型的使用[通俗易懂]
Handling method of qstring containing "\u0000" in QT
Matlab中图形对象属性gca使用
Idea annotation color modification method (clear)
延时函数如何延时
快手616战报首发,次抛精华引新浪潮,快品牌跃入热榜top3
Training of long and difficult sentences in postgraduate entrance examination day85
RMAN备份数据库_目录
New typereference usage fastjson[easy to understand]
C# asp,net core框架传值方式和session使用
【深入理解TcaplusDB技术】单据受理之创建游戏区
【深入理解TcaplusDB技术】一键安装Tmonitor后台