GETDEL

Returns a string value and removes its key.

Strings · Example verified

Syntax covered here

GETDEL key

A subsequent GET confirms that the key is absent.

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 greeting hello
"OK"
# connection: default
> GETDEL greeting
"hello"
# connection: default
> GET greeting
null