RENAMENX
Since 1.1.0KeysChanged in 1.2.1
Syntax
RENAMENX source destinationHistory
- 1.2.1: acl categories: removed generic
Renames source to destination only if destination does not exist.
Reply
1if the key was renamed.0ifdestinationexists; nothing changes.ERR no such keyifsourcedoes not exist.
Examples
> SET r2 v
OK
> SET r3 v
OK
> RENAMENX r2 r3
(integer) 0
> RENAMENX r2 r4
(integer) 1