Saturday 18 April 2015

HDEL key field1 field2 ... fieldN

Syntax
HDEL key field1 field2 ... fieldN
    Removes specified fields from the hash key.

Returns
The number of fields that were removed from the hash

127.0.0.1:6379> hgetall employee 
1) "1" 
2) "Sudheer" 
3) "2" 
4) "Kiran Kumar" 
5) "3" 
6) "Naveen" 
7) "4" 
8) "PTR PTR" 
127.0.0.1:6379> hdel employee 1 4 6 8 
(integer) 2 
127.0.0.1:6379> hgetall employee 
1) "2" 
2) "Kiran Kumar" 
3) "3" 
4) "Naveen" 

 
Prevoius                                                 Next                                                 Home

No comments:

Post a Comment