redis EXISTS command


  Translation results:

英[ɪgˈzɪst]   美[ɪɡˈzɪst]   

##vi.Existence; survive; live; continue to exist

Third person singular: exists Present participle: existing Past tense: existed Past participle: existed

redis EXISTS commandsyntax

Function: Check whether the given key exists.

Syntax: EXISTS key

Available versions: >= 1.0.0

Time complexity: O(1)

Return: If key exists, return 1, otherwise return 0.

redis EXISTS commandexample

redis> SET db "redis"
OK
redis> EXISTS db
(integer) 1
redis> DEL db
(integer) 1
redis> EXISTS db
(integer) 0

Popular Recommendations

Home

Videos

Q&A