zrem
ZREM
Apply for Redis Developer Course
|
Redis Regular Inspection / Technical Support
|
Redis Enterprise Server
|
|---|
Delete members
Usage: zrem key member.
You can specify multiple members.
Example
| Command> | zadd mycom 2009 "Sun microsystems" 1992 Wang 2002 Netscape |
| Result> | 3 |
| Command> | zadd mycom 1998 "Digital Equipment" 2005 K-mart 1987 "American motors" |
| Result> | 3 |
| Command> | zrange mycom 0 -1 withscores |
| Result> |
0) 1987 -> American motors 1) 1992 -> Wang 2) 1998 -> Digital Equipment 3) 2002 -> Netscape 4) 2005 -> K-mart 5) 2009 -> Sun microsystems |
| Command> | zrem mycom "American motors" "Wang" "Digital Equipment" |
| Result> | 3 |
| Command> | zrange mycom 0 -1 withscores |
| Result> |
0) 2002 -> Netscape 1) 2005 -> K-mart 2) 2009 -> Sun microsystems |
Syntax
ZREM key member [member]
- Available since version 1.2.0.
- Time complexity is O(M*log(N)). N is the number of members in the set, and M is the number of members to delete.
- Multiple members can be specified since version 2.4.
| Related commands | ZREMRANGEBYSCORE, ZREMRANGEBYLEX, ZREMRANGEBYRANK, SREM, HDEL |
| Clients for Java | Jedis, Lettuce, Redisson | Clients for C | Hiredis |
| << ZMSCORE | ZREM | ZRM >> |
|---|
Email
답글이 올라오면 이메일로 알려드리겠습니다.
