YouTip LogoYouTip

Transactions Discard

# Redis Discard Command # [ -- Learning More Than Just Technology, But Also Dreams!](#) * (javascript:void(0);) * (javascript:void(0);) * (javascript:void(0);) * (javascript:void(0)) Redis Tutorial (#)(#)(#)(#)(#) ## Redis Commands (#)(#)(#)(#)(#)(#)(#)(#)[Redis Pub/Sub](#)(#)(#)(#)(#)(#)(#) ## Redis Advanced Tutorial [Redis Data Backup & Recovery](#)(#)(#)(#)(#)(#)(#)(#) [](#)(#) (#)[](#) Deep Dive Programming Languages Web Services Computer Science Web Service Scripting Languages Scripts Software Development Tools Programming Web Design & Development # Redis Discard Command !(#)(#) The Redis Discard command is used to cancel a transaction, abandoning the execution of all commands within the transaction block. ### Syntax The basic syntax for the Redis Discard command is as follows: redis 127.0.0.1:6379> DISCARD ### Available Since >= 2.0.0 ### Return Value Always returns OK. ### Example 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 !(#)(#)
← Keys DelRedis Commands β†’