TYPE key

Returns the string representation of the type of the value stored at key. The different types that can be returned are: stringlistsetzset and hash.

Return value

Simple string reply: type of key, or none when key does not exist.

Examples

redis> SET key1 "value"
OK
redis> LPUSH key2 "value"
(integer) 1
redis> SADD key3 "value"
(integer) 1
redis> TYPE key1
string
redis> TYPE key2
list
redis> TYPE key3
set
redis> 

http://redis.io/commands/type

'Redis' 카테고리의 다른 글

레디스 값 지우는법  (0) 2016.01.20
redis get list 하는 방법  (0) 2016.01.20
[Redis] auth operation not permitted  (0) 2016.01.19
Redis 데이터 타입  (0) 2016.01.19
key hkey(filed) value 시 ttl 값 체크 hexists  (0) 2015.11.03
Posted by 이상욱1
,