Redis Flushdb 命令
Redis Flushdb 命令用於清空當前數據庫中的所有key。
語法
redis Flushdb 命令基本語法如下:
redis 127.0.0.1:6379> FLUSHDB
可用版本
>= 1.0.0
返回值
總是返回OK 。
實例
redis 127.0.0.1:6379> DBSIZE # 清空前的 key 数量 (integer) 4 redis 127.0.0.1:6379> FLUSHDB OK redis 127.0.0.1:6379> DBSIZE # 清空后的 key 数量 (integer) 0