Redis Flushall 命令

更新时间: 2019-07-07 15:54

Redis Flushall 命令用于清空整个 Redis 服务器的数据(删除所有数据库的所有 key )。

语法

redis Flushall 命令基本语法如下:

redis 127.0.0.1:6379> FLUSHALL 

可用版本

>= 1.0.0

返回值

总是返回 OK 。

实例

redis 127.0.0.1:6379> DBSIZE            # 0 号数据库的 key 数量
(integer) 9

redis 127.0.0.1:6379> SELECT 1          # 切换到 1 号数据库
OK

redis 127.0.0.1:6379> DBSIZE         # 1 号数据库的 key 数量
(integer) 6

redis 127.0.0.1:6379> flushall       # 清空所有数据库的所有 key
OK

redis 127.0.0.1:6379> DBSIZE         # 不但 1 号数据库被清空了
(integer) 0

redis 127.0.0.1:6379> SELECT 0       # 0 号数据库(以及其他所有数据库)也一样
OK

redis 127.0.0.1:6379> DBSIZE
(integer) 0

查看更多 Redis 服务器命令

Data Structures and Algorithms in Java

Data Structures and Algorithms in Java

Robert Lafore / Sams / 2002-11-06 / USD 64.99

Data Structures and Algorithms in Java, Second Edition is designed to be easy to read and understand although the topic itself is complicated. Algorithms are the procedures that software programs use......一起来看看 《Data Structures and Algorithms in Java》 这本书的介绍吧!

CSS 压缩/解压工具

CSS 压缩/解压工具

在线压缩/解压 CSS 代码

RGB转16进制工具

RGB转16进制工具

RGB HEX 互转工具