In Redis, the RENAMENX
command renames a key, but only if the new key doesn’t already exist.
RENAMENX
is similar to the RENAME
command, except that it only renames the key if the new one doesn’t already exist. The RENAME
command on the other hand, will overwrite the new key if it already exists.