Redis MOVE command is used to move a key from the currently selected database to the specified destination database.
Integer value 1 or 0
Following is the basic syntax of Redis MOVE command.
redis 127.0.0.1:6379> MOVE KEY_NAME DESTINATION_DATABASE
First, create a key in Redis and set some value in it.
redis 127.0.0.1:6379> SET tutorial1 redis OK
In Redis, by default 0th database is selected, so now we are moving the generated key in the second database.
redis 127.0.0.1:6379> MOVE tutorial1 1 1) (integer) 1