Redis DEL 命令

Redis 教程 · 2019-03-06 17:44:37

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

语法

redis DEL 命令基本语法如下:

redis 127.0.0.1:6379> DEL KEY_NAME

可用版本

>= 1.0.0

返回值

被删除 key 的数量。

实例

首先,我们在 redis 中创建一个 key 并设置值。

redis 127.0.0.1:6379> SET w3ckey redis
OK

现在我们删除已创建的 key。

redis 127.0.0.1:6379> DEL w3ckey
(integer) 1

点击查看所有 Redis 教程 文章: https://codercto.com/courses/l/33.html

查看所有标签

The Haskell School of Expression

The Haskell School of Expression

Paul Hudak / Cambridge University Press / 2000-01 / USD 95.00

Functional programming is a style of programming that emphasizes the use of functions (in contrast to object-oriented programming, which emphasizes the use of objects). It has become popular in recen......一起来看看 《The Haskell School of Expression》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

MD5 加密
MD5 加密

MD5 加密工具