修改本页

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

GET key

相关命令

始于1.0.0可用。

时间复杂度: O(1)

Get the value of key. If the key does not exist the special value nil is returned. An error is returned if the value stored at key is not a string, because GET only handles string values.

返回值

Bulk string reply: the value of key, or nil when key does not exist.

例子

redis> GET nonexisting

  1. (nil)

redis> SET mykey "Hello"

  1. OK

redis> GET mykey

  1. "Hello"
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