get.3valkey - Man Page

Returns the string value of a key.

Synopsis

GET key

Description

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.

Reply

Resp2

One of the following:

Resp3

One of the following:

Complexity

O(1)

Acl Categories

@fast @read @string

History

Examples

127.0.0.1:6379> GET nonexisting
(nil)
127.0.0.1:6379> SET mykey "Hello"
OK
127.0.0.1:6379> GET mykey
"Hello"

See Also

append(3valkey), decr(3valkey), decrby(3valkey), getdel(3valkey), getex(3valkey), getrange(3valkey), incr(3valkey), incrby(3valkey), incrbyfloat(3valkey), lcs(3valkey), mget(3valkey), mset(3valkey), msetnx(3valkey), set(3valkey), setrange(3valkey), strlen(3valkey)

Info

2024-09-23 8.0.0 Valkey Command Manual