Skip to main content

RENAMENX

Note

Official reference: RENAMENX.

Rename a key only if the destination does not exist.

Syntax​

RENAMENX key newkey

A missing source key causes an error.

Results​

ReturnRowsContent
Update count--1 if key was renamed; 0 if target key already exists.

Example​

SET demo:original hello
RENAMENX demo:original demo:new-name