Saturday 18 April 2015

HSET key field value


Syntax
HSET key field value

Sets field in the key to given value. If key doesn't exist new key is created. If field already exists, then the value stored at the field is overwritten.

Returns
1 if field is a new field in the hash and value was set.
0 if field already exists in the hash and the value was updated.


127.0.0.1:6379> hset employee 1 "Hari Krishna" 
(integer) 1 
127.0.0.1:6379> hget employee 1 
"Hari Krishna" 


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment