GET
AttentionThis page documents an earlier version. Go to the latest (v2.1)version.
Synopsis
GET keyThis command fetches the value that is associated with the given key.
- If the
keydoes not exist, null is returned. - If the
keyis associated with a non-string value, an error is raised.
Return Value
Returns string value of the given key.
Examples
You can do this as shown below.
1. $ GET yugakey
1. (null)
1. $ SET yugakey "Yugabyte"
1. "OK"
1. $ GET yugakey
1. "Yugabyte"
See Also
append, getrange, getset, incr, incrby, set, setrange, strlen
