redis中hash数据类型

database

remoteSelf:1>hset website google "www.google.com"

"1"

remoteSelf:1>hget website

"ERR wrong number of arguments for 'hget' command"

remoteSelf:1>hget website google

"www.google.com"

remoteSelf:1>hset website baidu "www.baidu.com"

"1"

remoteSelf:1>hget website baidu

"www.baidu.com"

remoteSelf:1>hget website google

"www.google.com"

website相当于map的名字

google相当于map website中的key,"www.google.com"是key google的value

remoteSelf:1>hlen website

"2"

remoteSelf:1>hkeys website

1) "google"

2) "baidu"

remoteSelf:1>hvals website

1) "www.google.com"

2) "www.baidu.com"

以上是 redis中hash数据类型 的全部内容, 来源链接: utcz.com/z/532186.html

回到顶部