当前位置:网站首页>Get to know the data structure of redis - hash
Get to know the data structure of redis - hash
2022-06-24 19:52:00 【just_ peanut】
Redis Five data types commonly used in :
1、 character string (String)
2、 String list (List)
3、 Ordered string collection (Sorted list)
4、 Hash (Hash)
5、 String collection (Set)
One 、 Store hash (Hash) Common commands
a. assignment hset/hmset
b, Value hget/hmget/hgetall
c. Delete hdel
d. add number hincrby
e. Self study order hexists/hlen/hkeys/hvals
127.0.0.1:6379> hset myhash username hwm
(integer) 1
127.0.0.1:6379> hset muhash age 18
(integer) 1
127.0.0.1:6379> hmset muhash2 username zwy age 21
OK
127.0.0.1:6379> hget myhash username
"hwm"
127.0.0.1:6379> hmget myhash username age
1) "hwm"
2) "12"
127.0.0.1:6379> hgetall myhash
1) "username"
2) "hwm"
3) "age"
4) "12"
127.0.0.1:6379> hdel muhash2 username age
(integer) 2
127.0.0.1:6379> hgetall muhash2
(empty array)
127.0.0.1:6379> hset myhash2 username hwm
(integer) 1
127.0.0.1:6379> del myhash2
(integer) 1
127.0.0.1:6379> hget myhash2 username
(nil)
127.0.0.1:6379> hget myhash age
"12"
127.0.0.1:6379> hincrby myhash age 5
(integer) 17
127.0.0.1:6379> hget myhash age
"17"
127.0.0.1:6379> hgetall myhash
1) "username"
2) "hwm"
3) "age"
4) "17"
127.0.0.1:6379> hexists myhash age
(integer) 1
127.0.0.1:6379> hlen myhash
(integer) 2
127.0.0.1:6379> hkeys myhash
1) "username"
2) "age"
127.0.0.1:6379> hvals myhash
1) "hwm"
2) "17"
127.0.0.1:6379>
边栏推荐
- MySQL binlog data source configuration document, please share
- php OSS文件读取和写入文件,workerman生成临时文件并输出浏览器下载
- Test drive citus 11.0 beta (official blog)
- flink cdc全量读mysql老是报这个错怎么处理
- Write a positive integer to the node and return a floating-point number multiplied by 0.85 when reading the node
- Camera module and hardware interface of Camera1 camera
- Multi cloud mode is not a "master key"
- Teach you how to cancel computer hibernation
- Xiaodi class massive data processing business short chain platform
- Uninstall tool v3.5.10.5670 single file portable official version
猜你喜欢

Openstack actual installation and deployment tutorial, openstack installation tutorial

【Go語言刷題篇】Go從0到入門4:切片的高級用法、初級複習與Map入門學習

Obstacle avoidance sensor module (stm32f103c8t6)

starring V6平台开发接出点流程

Vs2017 add header file path method

php OSS文件读取和写入文件,workerman生成临时文件并输出浏览器下载

R for Data Science (notes) -- data transformation (used by filter)

Power supply noise analysis

一次 MySQL 误操作导致的事故,高可用都不顶不住!

Todesk remote control, detailed introduction and tutorial
随机推荐
mysql binlog 数据源配置文档麻烦分享一下
Working for 6 years with a monthly salary of 3W and a history of striving for one PM
The efficiency of okcc call center data operation
Bat learning notes
Write a positive integer to the node and return a floating-point number multiplied by 0.85 when reading the node
Will the CDC read out of order when I use SQL
Database index can improve query efficiency. Ask what will improve, what is the difference between inapplicable index and index use, and what will happen.
Geoscience remote sensing data collection online
Power supply noise analysis
Obstacle avoidance sensor module (stm32f103c8t6)
Teach you how to view the number of connected people on WiFi in detail how to view the number of connected people on WiFi
Todesk remote control, detailed introduction and tutorial
Would you like to ask whether the same multiple tasks of the PgSQL CDC account will have an impact? I now have only one of the three tasks
What are the functions of IBPs open source form designer?
Confirm whether the host is a large terminal or a small terminal
Install the custom module into the system and use find in the independent project_ Package found
finkcdc支持sqlserver2008么?
Understanding openstack network
小白请教下各位大佬,cdc抽取mysql binlog是严格顺序的吗
IP address to integer