-
-
Notifications
You must be signed in to change notification settings - Fork 98
Common commands
Alexandr Topilski edited this page Jul 17, 2018
·
15 revisions
-
SET - Set the value of a key, example:
SET test value -
GET - Get the value of a key, example:
GET test -
DEL - Delete key, example:
DEL test -
RENAME - Rename a key
RENAME test test2 -
DBKCOUNT - Return the number of keys in the selected database
DBKCOUNT -
KEYS - Find all keys matching the given limits
KEYS a z 100(for Redis:KEYS *) -
SCAN - Incrementally iterate the keys space
SCAN 0 -
FLUSHDB - Remove all keys from the current database
FLUSHDB -
INFO - Server information
INFO <section or noting>
SET test value => OK
GET test => value
RENAME test test2 => OK
GET test2 => value
SET test3 value3 => OK
GET test3 => value3
DBKCOUNT => 2
KEYS a z 100 => test2\ntest3
SCAN 0 => test2\ntest3
DEL test2 => 1
FLUSHDB => OK
