Redis Hash Hvals 命令 Redis HVALS 命令用于获取存储在键上的哈希中的所有值。 返回值 数组回复,包含哈希中的所有值,如果键不存在则返回空列表。 语法 以下是 Redis HVALS 命令的基本语法。 redis 127.0.0.1:6379> HVALS KEY_NAME FIELD VALUEBashCopy 示例 redis 127.0.0.1:6379> HSET myhash field1 "foo" (integer) 1 redis 127.0.0.1:6379> HSET myhash field2 "bar" (integer) 1 redis 127.0.0.1:6379> HVALS myhash 1) "foo" 2) "bar" BashCopy