English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Redis Discard Command

Redis Transactions

The Redis Discard command is used to cancel transactions, and to give up executing all commands within the transaction block.

Syntax

The basic syntax of the redis Discard command is as follows:

redis 127.0.0.1:6379> DISCARD

Available Version

>= 2.0.0

Return Value

Always returns OK .

Online Examples

redis 127.0.0.1:6379> MULTI
OK
redis 127.0.0.1:6379> PING
QUEUED
redis 127.0.0.1:6379> SET greeting "hello"
QUEUED
redis 127.0.0.1:6379> DISCARD
OK

Redis Transactions