Redis – String Append Command

  • Post author:
  • Post category:Redis
  • Post comments:0 Comments

Redis APPEND command is used to add some value in a key.

Return Value

Integer reply, the length of the string after the append operation.

Syntax

Following is the basic syntax of Redis APPEND command.

redis 127.0.0.1:6379> APPEND KEY_NAME NEW_VALUE

Example

redis 127.0.0.1:6379> SET mykey "hello" 
OK 
redis 127.0.0.1:6379> APPEND mykey " Adglob" 
(integer) 20 
redis 127.0.0.1:6379> GET mykey  
"hello Adglob"

Leave a Reply