RENAME

Changes a key's name.

Keys & expiration · Example verified

Syntax covered here

RENAME source destination

The case renames an existing string key to a previously unused destination.

Tested example & replies

Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.

# connection: default
> SET sample value
"OK"
# connection: default
> RENAME sample renamed
"OK"