Redis EXISTS 命令
Redis 教程
· 2019-03-06 18:12:52
Redis EXISTS 命令用于检查给定 key 是否存在。
语法
redis EXISTS 命令基本语法如下:
redis 127.0.0.1:6379> EXISTS KEY_NAME
可用版本
>= 1.0.0
返回值
若 key 存在返回 1 ,否则返回 0 。
实例
redis 127.0.0.1:6379> EXISTS codercto-new-key (integer) 0
现在我们创建一个名为 codercto-new-key 的键并赋值,再使用 EXISTS 命令。
redis 127.0.0.1:6379> set codercto-new-key newkey OK redis 127.0.0.1:6379> EXISTS codercto-new-key (integer) 1 redis 127.0.0.1:6379>
点击查看所有 Redis 教程 文章: https://codercto.com/courses/l/33.html
Out of Control
Kevin Kelly / Basic Books / 1995-4-14 / USD 22.95
Out of Control is a summary of what we know about self-sustaining systems, both living ones such as a tropical wetland, or an artificial one, such as a computer simulation of our planet. The last chap......一起来看看 《Out of Control》 这本书的介绍吧!