Skip to main content

DECR

Note

Official reference: DECR.

Decrement an integer by one, starting from zero for a missing key.

Syntax

DECR key

Values and increments must be signed 64-bit integers. Non-integer content or overflow causes an error.

Results

ReturnRowsContent
ResultSet1VALUE field, LONG type

Example

SET demo:counter 10
DECR demo:counter