Redis - 附加字串命令



Redis APPEND 命令用於向鍵中新增某些值。

返回值

整數回覆,追加操作後字串的長度。

語法

以下是 Redis APPEND 命令的基本語法。

redis 127.0.0.1:6379> APPEND KEY_NAME NEW_VALUE

示例

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
廣告