GET key
相关命令
- APPEND
 - BITCOUNT
 - BITOP
 - BITPOS
 - DECR
 - DECRBY
 - GET
 - GETBIT
 - GETRANGE
 - GETSET
 - INCR
 - INCRBY
 - INCRBYFLOAT
 - MGET
 - MSET
 - MSETNX
 - PSETEX
 - SET
 - SETBIT
 - SETEX
 - SETNX
 - SETRANGE
 - STRLEN
 
始于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
- (nil)
 
redis> SET mykey "Hello"
- OK
 
redis> GET mykey
- "Hello"
 
This website is open source software developed by Citrusbyte.
The Redis logo was designed by Carlos Prioglio. See more credits.
 
 