EXISTS
AttentionThis page documents an earlier version. Go to the latest (v2.1)version.
Early Releases: Single-key request only. Requests with multiple keys are not yet supported.
Synopsis
EXISTS key [key …]
This command is a predicate to check whether or not the given key
exists.
Return Value
Returns the number of existing keys.
Examples
You can do this as shown below.
$ SET yuga1 "Africa"
"OK"
$ SET yuga2 "America"
"OK"
$ EXISTS yuga1
1
$ EXISTS yuga1 yuga2 not_a_key
2
See Also
del
, get
, getrange
, hdel
, hexists
, hget
, hset
, hincrby
, sadd
, set
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .