HEXISTS key_name key(检查键key是否存在)
HKEYS key_name(获得散列的所有键)
HVALS key_name(获得散列的所有值)
HINCRBY key_name key num(将键对应的值加整数num)
HINCRYBYFLOAT key_name key num(将键对应的值加浮点数num)
root@localhost:~# redis-cli
127.0.0.1:> hmset hash a b
OK
127.0.0.1:> hkeys hash
) "a"
) "b"
127.0.0.1:> hexists hash a
(integer)
127.0.0.1:> hexists hash c
(integer)
127.0.0.1:> hincrby hash a -
(integer) -
127.0.0.1:> hget hash a
"-1"
127.0.0.1:> hincrbyfloat hash b 1.2
"3.2"