English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Redis Setbit command is used to set or clear the bit at the specified offset on the string value stored by the key.
The basic syntax of the redis Setbit command is as follows:
redis 127.0.0.1:6379> Setbit KEY_NAME OFFSET
>= 2.2.0
The bit at the specified offset that was stored.
redis> SETBIT bit 10086 1 (integer) 0 redis> GETBIT bit 10086 (integer) 1 redis> GETBIT bit 100 # bit is initialized to 0 by default (integer) 0