Redis DEL 命令

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

Redis DEL 命令用于删除已存在的键。不存在的 key 会被忽略。

语法

redis 127.0.0.1:6379> DEL KEY_NAME

返回值

被删除 key 的数量。

实例

实例1: 当 key 不存在时

127.0.0.1:6379> exists domain
(integer) 0
127.0.0.1:6379> del domain
(integer) 0

实例2: 当 key 存在时

127.0.0.1:6379> set domain www.codercto.com
OK
127.0.0.1:6379> del domain
(integer) 1

查看更多 Redis key 命令

How to Think About Algorithms

How to Think About Algorithms

Jeff Edmonds / Cambridge University Press / 2008-05-19 / USD 38.99

HOW TO THINK ABOUT ALGORITHMS There are many algorithm texts that provide lots of well-polished code and proofs of correctness. Instead, this one presents insights, notations, and analogies t......一起来看看 《How to Think About Algorithms》 这本书的介绍吧!

RGB转16进制工具

RGB转16进制工具

RGB HEX 互转工具

SHA 加密

SHA 加密

SHA 加密工具

UNIX 时间戳转换

UNIX 时间戳转换

UNIX 时间戳转换