修改本页

Redis 命令 客户端 文档 社区 下载 问题 支持 许可

MGET key [key …]

相关命令

始于1.0.0可用。

时间复杂度: O(N) where N is the number of keys to retrieve.

Returns the values of all specified keys. For every key that does not hold a string value or does not exist, the special value nil is returned. Because of this, the operation never fails.

返回值

Array reply: list of values at the specified keys.

例子

redis> SET key1 "Hello"

  1. OK

redis> SET key2 "World"

  1. OK

redis> MGET key1 key2 nonexisting

  1. 1) "Hello"
  2. 2) "World"
  3. 3) (nil)
redis>

Comments powered by Disqus

This website is open source software developed by Citrusbyte.

The Redis logo was designed by Carlos Prioglio. See more credits.

Sponsored by Redis Support