Back to Yugabyte Db

GET

docs/content/stable/yedis/api/get.md

2026.1.0.0-b25634 B
Original Source

Synopsis

GET key

This command fetches the value that is associated with the given key.

  • If the key does not exist, null is returned.
  • If the key is associated with a non-string value, an error is raised.

Return value

Returns string value of the given key.

Examples

sh
$ GET yugakey
(null)
sh
$ SET yugakey "Yugabyte"
"OK"
sh
$ GET yugakey
"Yugabyte"

See also

append, getrange, getset, incr, incrby, set, setrange, strlen