= 1"0.0 Return Value" />
English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Redis Dbsize command is used to return the number of keys in the current database.
The basic syntax of the redis DBSIZE command is as follows:
redis 127.0.0.1:6379> DBSIZE
>= 1.0.0
The number of keys in the current database.
redis 127.0.0.1:6379> DBSIZE (integer) 5 redis 127.0.0.1:6379> SET new_key "hello_moto" # Try adding a key OK redis 127.0.0.1:6379> DBSIZE (integer) 6