《Redis使用手册》(试读版)redis> SMOVE fruits favorite-fruits "apple" (integer) 1 那么 fruits 集合中的 "apple" 元素将被移动到 favorite-fruits 集合⾥⾯, 覆盖掉 favorite-fruits 集合原有的 "apple" 元素。 从结果来看, "apple" 元素将从 fruits 集合中消失, ⽽ favorite-fruits 集合、 favorite-numbers 集合以及 databases 集合的所有 元素: redis> SMEMBERS fruits 1) "banana" 2) "cherry" 3) "apple" redis> SMEMBERS favorite-numbers 1) "12345" 2) "999" 3) "3.14" 4) "1024" 5) "10086" redis> 命令时的结果并不相同: redis> SADD fruits-a "apple" "banana" "cherry" (integer) 3 redis> SMEMBERS fruits-a 1) "cherry" 2) "banana" 3) "apple" redis> SADD fruits-b "cherry" "banana" "apple" (integer) 3 redis> SMEMBERS0 码力 | 352 页 | 6.57 MB | 1 年前3
共 1 条
- 1













