Redis - String Append Command



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 " tutorialspoint" 
(integer) 20 
redis 127.0.0.1:6379> GET mykey  
"hello tutorialspoint"
redis_strings.htm
Advertisements