Redis String: APPEND key value
Description
Redis APPEND command is used to add some value in a key. If the key already exists and is a string, this command appends the value at the end of the string. If key does not exist it is created and set as an empty string,
Syntax:
Basic syntax of redis APPEND command is shown below:
redis 127.0.0.1:6379> APPEND KEY_NAME NEW_VALUE
Available since
2.0.0.
Return Value
Integer reply, the length of the string after the append operation.
Return Value Type
Integer
Example:
redis 127.0.0.1:6379> SET mykey "hello" OK redis 127.0.0.1:6379> APPEND mykey "w3resource" (integer) 20 redis 127.0.0.1:6379> GET mykey "hello tutorialspoint"
Previous:
DECRBY
Next:
Redis Hashes HDEL
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework